diff --git a/config_server/protocol/v2/agent.proto b/config_server/protocol/v2/agent.proto index 36d8a807fb..ba53bfcff3 100644 --- a/config_server/protocol/v2/agent.proto +++ b/config_server/protocol/v2/agent.proto @@ -70,7 +70,7 @@ enum RequestFlags { // API: /Agent/Heartbeat // Agent sends requests to the ConfigServer to get config updates and receive commands. -message HearbeatRequest { +message HeartbeatRequest { bytes request_id = 1; uint64 sequence_num = 2; // Increment every request, for server to check sync status uint64 capabilities = 3; // Bitmask of flags defined by AgentCapabilities enum @@ -85,7 +85,7 @@ message HearbeatRequest { repeated CommandInfo custom_commands = 12; // Information about command history uint64 flags = 13; // Predefined command flag bytes opaque = 14; // Opaque data for extension - // before 100 (inclusive) are reserved for future official fields} + // before 100 (inclusive) are reserved for future official fields } // Define Config's detail diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 7f74807c3a..6a5d6123a6 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -104,7 +104,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/flusher/links.cmake) # Subdirectories (modules). except for common, input, processor, flusher, observer, helper and spl. set(SUB_DIRECTORIES_LIST - batch application app_config checkpoint compression config config/provider config/watcher config_manager config_server_pb + batch application app_config checkpoint compression config config/feedbacker config/provider config/watcher config_manager config_server_pb/v1 config_server_pb/v2 container_manager controller event event_handler event_listener file_server go_pipeline log_pb logger models monitor parser pipeline plugin plugin/creator plugin/instance plugin/interface polling profile_sender queue reader sdk sender serializer sls_control fuse diff --git a/core/application/Application.cpp b/core/application/Application.cpp index 5b7c81c505..e5d0c7a7ac 100644 --- a/core/application/Application.cpp +++ b/core/application/Application.cpp @@ -42,7 +42,8 @@ #include "monitor/LogFileProfiler.h" #include "monitor/MetricExportor.h" #include "monitor/Monitor.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" +#include "pipeline/ProcessConfigManager.h" #include "plugin/PluginRegistry.h" #include "processor/daemon/LogProcess.h" #include "sender/Sender.h" @@ -193,17 +194,32 @@ void Application::Start() { // GCOVR_EXCL_START // flusher_sls should always be loaded, since profiling will rely on this. Sender::Instance()->Init(); - // add local config dir - filesystem::path localConfigPath - = filesystem::path(AppConfig::GetInstance()->GetLogtailSysConfDir()) / "config" / "local"; - error_code ec; - filesystem::create_directories(localConfigPath, ec); - if (ec) { - LOG_WARNING(sLogger, - ("failed to create dir for local config", - "manual creation may be required")("error code", ec.value())("error msg", ec.message())); + { + // add local config dir + filesystem::path localConfigPath + = filesystem::path(AppConfig::GetInstance()->GetLogtailSysConfDir()) / "config" / "local"; + error_code ec; + filesystem::create_directories(localConfigPath, ec); + if (ec) { + LOG_WARNING(sLogger, + ("failed to create dir for local pipelineconfig", + "manual creation may be required")("error code", ec.value())("error msg", ec.message())); + } + ConfigWatcher::GetInstance()->AddPipelineSource(localConfigPath.string()); + } + { + // add local config dir + filesystem::path localConfigPath + = filesystem::path(AppConfig::GetInstance()->GetLogtailSysConfDir()) / "processconfig" / "local"; + error_code ec; + filesystem::create_directories(localConfigPath, ec); + if (ec) { + LOG_WARNING(sLogger, + ("failed to create dir for local processconfig", + "manual creation may be required")("error code", ec.value())("error msg", ec.message())); + } + ConfigWatcher::GetInstance()->AddProcessSource(localConfigPath.string()); } - ConfigWatcher::GetInstance()->AddSource(localConfigPath.string()); #ifdef __ENTERPRISE__ EnterpriseConfigProvider::GetInstance()->Init("enterprise"); @@ -251,9 +267,13 @@ void Application::Start() { // GCOVR_EXCL_START lastCheckTagsTime = curTime; } if (curTime - lastConfigCheckTime >= INT32_FLAG(config_scan_interval)) { - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); - if (!diff.IsEmpty()) { - PipelineManager::GetInstance()->UpdatePipelines(diff); + PipelineConfigDiff pipelineConfigDiff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); + if (!pipelineConfigDiff.IsEmpty()) { + PipelineManager::GetInstance()->UpdatePipelines(pipelineConfigDiff); + } + ProcessConfigDiff processConfigDiff = ConfigWatcher::GetInstance()->CheckProcessConfigDiff(); + if (!processConfigDiff.IsEmpty()) { + ProcessConfigManager::GetInstance()->UpdateProcessConfigs(processConfigDiff); } lastConfigCheckTime = curTime; } diff --git a/core/config/ConfigDiff.h b/core/config/ConfigDiff.h index 0564214a48..1512cfc7a3 100644 --- a/core/config/ConfigDiff.h +++ b/core/config/ConfigDiff.h @@ -19,16 +19,26 @@ #include #include -#include "config/Config.h" +#include "config/PipelineConfig.h" +#include "config/ProcessConfig.h" namespace logtail { -struct ConfigDiff { - std::vector mAdded; - std::vector mModified; +class PipelineConfigDiff { +public: + std::vector mAdded; + std::vector mModified; std::vector mRemoved; std::vector mUnchanged; // 过渡使用,仅供插件系统用 + bool IsEmpty() { return mRemoved.empty() && mAdded.empty() && mModified.empty(); } +}; +class ProcessConfigDiff { +public: + std::vector mAdded; + std::vector mModified; + std::vector mRemoved; + std::vector mUnchanged; // 过渡使用,仅供插件系统用 bool IsEmpty() { return mRemoved.empty() && mAdded.empty() && mModified.empty(); } }; diff --git a/core/config/Config.cpp b/core/config/PipelineConfig.cpp similarity index 99% rename from core/config/Config.cpp rename to core/config/PipelineConfig.cpp index 9613497410..ebd9f12768 100644 --- a/core/config/Config.cpp +++ b/core/config/PipelineConfig.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "config/Config.h" +#include "config/PipelineConfig.h" #include @@ -94,7 +94,7 @@ static void ReplaceEnvVarRef(Json::Value& value, bool& res) { } } -bool Config::Parse() { +bool PipelineConfig::Parse() { if (BOOL_FLAG(enable_env_ref_in_config)) { if (ReplaceEnvVar()) { LOG_INFO(sLogger, ("env vars in config are replaced, config", mDetail->toStyledString())("config", mName)); @@ -698,7 +698,7 @@ bool Config::Parse() { return true; } -bool Config::ReplaceEnvVar() { +bool PipelineConfig::ReplaceEnvVar() { bool res = false; ReplaceEnvVarRef(*mDetail, res); return res; diff --git a/core/config/Config.h b/core/config/PipelineConfig.h similarity index 90% rename from core/config/Config.h rename to core/config/PipelineConfig.h index 65bb8c583e..151bc69c56 100644 --- a/core/config/Config.h +++ b/core/config/PipelineConfig.h @@ -27,7 +27,7 @@ namespace logtail { -struct Config { +struct PipelineConfig { std::string mName; std::unique_ptr mDetail; uint32_t mCreateTime = 0; @@ -49,7 +49,7 @@ struct Config { std::string mLogstore; std::string mRegion; - Config(const std::string& name, std::unique_ptr&& detail) : mName(name), mDetail(std::move(detail)) {} + PipelineConfig(const std::string& name, std::unique_ptr&& detail) : mName(name), mDetail(std::move(detail)) {} bool Parse(); @@ -75,11 +75,11 @@ struct Config { bool ReplaceEnvVar(); }; -inline bool operator==(const Config& lhs, const Config& rhs) { +inline bool operator==(const PipelineConfig& lhs, const PipelineConfig& rhs) { return (lhs.mName == rhs.mName) && (*lhs.mDetail == *rhs.mDetail); } -inline bool operator!=(const Config& lhs, const Config& rhs) { +inline bool operator!=(const PipelineConfig& lhs, const PipelineConfig& rhs) { return !(lhs == rhs); } diff --git a/core/config/ProcessConfig.cpp b/core/config/ProcessConfig.cpp new file mode 100644 index 0000000000..158b564186 --- /dev/null +++ b/core/config/ProcessConfig.cpp @@ -0,0 +1,30 @@ +// Copyright 2023 iLogtail Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "config/ProcessConfig.h" + +#include + +#include "app_config/AppConfig.h" +#include "common/FileSystemUtil.h" +#include "common/Flags.h" +#include "common/JsonUtil.h" +#include "common/ParamExtractor.h" +#include "common/YamlUtil.h" +#include "plugin/PluginRegistry.h" + + +using namespace std; + +namespace logtail {} // namespace logtail diff --git a/core/config/ProcessConfig.h b/core/config/ProcessConfig.h new file mode 100644 index 0000000000..fffb60833f --- /dev/null +++ b/core/config/ProcessConfig.h @@ -0,0 +1,88 @@ +/* + * Copyright 2023 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include +#include +#include +#include +#include + +namespace logtail { + +struct ProcessConfig { + std::string mName; + std::unique_ptr mDetail; + + // for alarm only + std::string mProject; + std::string mLogstore; + std::string mRegion; + + ProcessConfig(const std::string& name, std::unique_ptr&& detail) + : mName(name), mDetail(std::move(detail)) { + mProject = ""; + mLogstore = ""; + mRegion = ""; + } + ProcessConfig(const logtail::ProcessConfig& config) { + mName = config.mName; + mDetail = std::make_unique(*config.mDetail); + mProject = ""; + mLogstore = ""; + mRegion = ""; + } + + ProcessConfig& operator=(ProcessConfig&& other) { + if (this != &other) { + mName = std::move(other.mName); + mDetail = std::move(other.mDetail); + mProject = ""; + mLogstore = ""; + mRegion = ""; + } + return *this; + } + + ProcessConfig& operator=(const ProcessConfig& other) { + if (this != &other) { + mName = other.mName; + mDetail = std::make_unique(*other.mDetail); + mProject = ""; + mLogstore = ""; + mRegion = ""; + } + return *this; + } + + bool Parse() { return true; } + + const Json::Value& GetConfig() const { return *mDetail; } +}; + +inline bool operator==(const ProcessConfig& lhs, const ProcessConfig& rhs) { + return (lhs.mName == rhs.mName) && (*lhs.mDetail == *rhs.mDetail); +} + +inline bool operator!=(const ProcessConfig& lhs, const ProcessConfig& rhs) { + return !(lhs == rhs); +} + +} // namespace logtail diff --git a/core/config/feedbacker/ConfigFeedbackReceiver.cpp b/core/config/feedbacker/ConfigFeedbackReceiver.cpp new file mode 100644 index 0000000000..5e27bf7713 --- /dev/null +++ b/core/config/feedbacker/ConfigFeedbackReceiver.cpp @@ -0,0 +1,91 @@ +/* + * Copyright 2024 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "config/feedbacker/ConfigFeedbackReceiver.h" + +#include + +namespace logtail { + +ConfigFeedbackReceiver& ConfigFeedbackReceiver::GetInstance() { + static ConfigFeedbackReceiver instance; + return instance; +} + +void ConfigFeedbackReceiver::RegisterPipelineConfig(const std::string& name, ConfigFeedbackable* feedbackable) { + std::lock_guard lock(mMutex); + mPipelineConfigFeedbackableMap[name] = feedbackable; +} + +void ConfigFeedbackReceiver::RegisterProcessConfig(const std::string& name, ConfigFeedbackable* feedbackable) { + std::lock_guard lock(mMutex); + mProcessConfigFeedbackableMap[name] = feedbackable; +} + +void ConfigFeedbackReceiver::RegisterCommand(const std::string& type, + const std::string& name, + ConfigFeedbackable* feedbackable) { + std::lock_guard lock(mMutex); + mCommandFeedbackableMap[GenerateCommandFeedBackKey(type, name)] = feedbackable; +} + +void ConfigFeedbackReceiver::UnregisterPipelineConfig(const std::string& name) { + std::lock_guard lock(mMutex); + mPipelineConfigFeedbackableMap.erase(name); +} + +void ConfigFeedbackReceiver::UnregisterProcessConfig(const std::string& name) { + std::lock_guard lock(mMutex); + mProcessConfigFeedbackableMap.erase(name); +} + +void ConfigFeedbackReceiver::UnregisterCommand(const std::string& type, const std::string& name) { + std::lock_guard lock(mMutex); + mCommandFeedbackableMap.erase(GenerateCommandFeedBackKey(type, name)); +} + +void ConfigFeedbackReceiver::FeedbackPipelineConfigStatus(const std::string& name, ConfigFeedbackStatus status) { + std::lock_guard lock(mMutex); + auto iter = mPipelineConfigFeedbackableMap.find(name); + if (iter != mPipelineConfigFeedbackableMap.end()) { + iter->second->FeedbackPipelineConfigStatus(name, status); + } +} + +void ConfigFeedbackReceiver::FeedbackProcessConfigStatus(const std::string& name, ConfigFeedbackStatus status) { + std::lock_guard lock(mMutex); + auto iter = mProcessConfigFeedbackableMap.find(name); + if (iter != mProcessConfigFeedbackableMap.end()) { + iter->second->FeedbackProcessConfigStatus(name, status); + } +} + +void ConfigFeedbackReceiver::FeedbackCommandConfigStatus(const std::string& type, + const std::string& name, + ConfigFeedbackStatus status) { + std::lock_guard lock(mMutex); + auto iter = mCommandFeedbackableMap.find(GenerateCommandFeedBackKey(type, name)); + if (iter != mCommandFeedbackableMap.end()) { + iter->second->FeedbackCommandConfigStatus(type, name, status); + } +} + +std::string GenerateCommandFeedBackKey(const std::string& type, const std::string& name) { + return type + '\1' + name; +} + +} // namespace logtail diff --git a/core/config/feedbacker/ConfigFeedbackReceiver.h b/core/config/feedbacker/ConfigFeedbackReceiver.h new file mode 100644 index 0000000000..47b08ca22e --- /dev/null +++ b/core/config/feedbacker/ConfigFeedbackReceiver.h @@ -0,0 +1,49 @@ +/* + * Copyright 2024 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include "config/feedbacker/ConfigFeedbackable.h" + +namespace logtail { + +std::string GenerateCommandFeedBackKey(const std::string& type, const std::string& name); + +class ConfigFeedbackReceiver { +public: + static ConfigFeedbackReceiver& GetInstance(); + void RegisterPipelineConfig(const std::string& name, ConfigFeedbackable* feedbackable); + void RegisterProcessConfig(const std::string& name, ConfigFeedbackable* feedbackable); + void RegisterCommand(const std::string& type, const std::string& name, ConfigFeedbackable* feedbackable); + void UnregisterPipelineConfig(const std::string& name); + void UnregisterProcessConfig(const std::string& name); + void UnregisterCommand(const std::string& type, const std::string& name); + void FeedbackPipelineConfigStatus(const std::string& name, ConfigFeedbackStatus status); + void FeedbackProcessConfigStatus(const std::string& name, ConfigFeedbackStatus status); + void FeedbackCommandConfigStatus(const std::string& type, const std::string& name, ConfigFeedbackStatus status); + +private: + ConfigFeedbackReceiver() {} + std::mutex mMutex; + std::unordered_map mPipelineConfigFeedbackableMap; + std::unordered_map mProcessConfigFeedbackableMap; + std::unordered_map mCommandFeedbackableMap; +}; + +} // namespace logtail diff --git a/core/config/feedbacker/ConfigFeedbackable.cpp b/core/config/feedbacker/ConfigFeedbackable.cpp new file mode 100644 index 0000000000..b63aa386a0 --- /dev/null +++ b/core/config/feedbacker/ConfigFeedbackable.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2024 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "config/feedbacker/ConfigFeedbackable.h" + +namespace logtail { + +std::string_view ToStringView(ConfigFeedbackStatus status) { + switch (status) { + case ConfigFeedbackStatus::APPLYING: + return "APPLYING"; + case ConfigFeedbackStatus::APPLIED: + return "APPLIED"; + case ConfigFeedbackStatus::FAILED: + return "FAILED"; + case ConfigFeedbackStatus::DELETED: + return "DELETED"; + default: + return "UNKNOWN"; + } +} + +} // namespace logtail diff --git a/core/config/feedbacker/ConfigFeedbackable.h b/core/config/feedbacker/ConfigFeedbackable.h new file mode 100644 index 0000000000..b8564ac5d3 --- /dev/null +++ b/core/config/feedbacker/ConfigFeedbackable.h @@ -0,0 +1,38 @@ +/* + * Copyright 2024 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace logtail { + +enum class ConfigFeedbackStatus { UNSET = 0, APPLYING = 1, APPLIED = 2, FAILED = 3, DELETED = 4 }; + +std::string_view ToStringView(ConfigFeedbackStatus status); + +class ConfigFeedbackable { +public: + virtual ~ConfigFeedbackable() = default; // LCOV_EXCL_LINE + virtual void FeedbackPipelineConfigStatus(const std::string& name, ConfigFeedbackStatus status) = 0; + virtual void FeedbackProcessConfigStatus(const std::string& name, ConfigFeedbackStatus status) = 0; + virtual void + FeedbackCommandConfigStatus(const std::string& type, const std::string& name, ConfigFeedbackStatus status) + = 0; +}; + +} // namespace logtail diff --git a/core/config/provider/CommonConfigProvider.cpp b/core/config/provider/CommonConfigProvider.cpp index ab942a0ce1..08687686ca 100644 --- a/core/config/provider/CommonConfigProvider.cpp +++ b/core/config/provider/CommonConfigProvider.cpp @@ -285,19 +285,19 @@ void CommonConfigProvider::UpdateRemoteConfig( const google::protobuf::RepeatedPtrField& checkResults, const google::protobuf::RepeatedPtrField& configDetails) { error_code ec; - filesystem::create_directories(mSourceDir, ec); + filesystem::create_directories(mPipelineSourceDir, ec); if (ec) { StopUsingConfigServer(); LOG_ERROR(sLogger, ("failed to create dir for common configs", "stop receiving config from common config server")( - "dir", mSourceDir.string())("error code", ec.value())("error msg", ec.message())); + "dir", mPipelineSourceDir.string())("error code", ec.value())("error msg", ec.message())); return; } - lock_guard lock(mMux); + lock_guard lock(mPipelineMux); for (const auto& checkResult : checkResults) { - filesystem::path filePath = mSourceDir / (checkResult.name() + ".yaml"); - filesystem::path tmpFilePath = mSourceDir / (checkResult.name() + ".yaml.new"); + filesystem::path filePath = mPipelineSourceDir / (checkResult.name() + ".yaml"); + filesystem::path tmpFilePath = mPipelineSourceDir / (checkResult.name() + ".yaml.new"); switch (checkResult.check_status()) { case configserver::proto::DELETED: mConfigNameVersionMap.erase(checkResult.name()); diff --git a/core/config/provider/CommonConfigProvider.h b/core/config/provider/CommonConfigProvider.h index c4bdb4da09..5a8a154e04 100644 --- a/core/config/provider/CommonConfigProvider.h +++ b/core/config/provider/CommonConfigProvider.h @@ -24,7 +24,7 @@ #include #include "config/provider/ConfigProvider.h" -#include "config_server_pb/agent.pb.h" +#include "config_server_pb/v1/agent.pb.h" namespace logtail { diff --git a/core/config/provider/ConfigProvider.cpp b/core/config/provider/ConfigProvider.cpp index 4d18099bbf..dd3d864f38 100644 --- a/core/config/provider/ConfigProvider.cpp +++ b/core/config/provider/ConfigProvider.cpp @@ -20,16 +20,24 @@ using namespace std; namespace logtail { - + void ConfigProvider::Init(const string& dir) { // default path: /etc/ilogtail/config/${dir} - mSourceDir.assign(AppConfig::GetInstance()->GetLogtailSysConfDir()); - mSourceDir /= "config"; - mSourceDir /= dir; + mPipelineSourceDir.assign(AppConfig::GetInstance()->GetLogtailSysConfDir()); + mPipelineSourceDir /= "config"; + mPipelineSourceDir /= dir; + + mProcessSourceDir.assign(AppConfig::GetInstance()->GetLogtailSysConfDir()); + mProcessSourceDir /= "processconfig"; + mProcessSourceDir /= dir; error_code ec; - filesystem::create_directories(mSourceDir, ec); - ConfigWatcher::GetInstance()->AddSource(mSourceDir, &mMux); + filesystem::create_directories(mPipelineSourceDir, ec); + ConfigWatcher::GetInstance()->AddPipelineSource(mPipelineSourceDir, &mPipelineMux); + + ec.clear(); + filesystem::create_directories(mProcessSourceDir, ec); + ConfigWatcher::GetInstance()->AddProcessSource(mProcessSourceDir, &mProcessMux); } } // namespace logtail diff --git a/core/config/provider/ConfigProvider.h b/core/config/provider/ConfigProvider.h index c763e65338..0e789d091d 100644 --- a/core/config/provider/ConfigProvider.h +++ b/core/config/provider/ConfigProvider.h @@ -34,8 +34,10 @@ class ConfigProvider { ConfigProvider() = default; virtual ~ConfigProvider() = default; - std::filesystem::path mSourceDir; - mutable std::mutex mMux; + std::filesystem::path mPipelineSourceDir; + std::filesystem::path mProcessSourceDir; + mutable std::mutex mPipelineMux; + mutable std::mutex mProcessMux; }; } // namespace logtail diff --git a/core/config/watcher/ConfigWatcher.cpp b/core/config/watcher/ConfigWatcher.cpp index b14dc2a3f5..c3afda509e 100644 --- a/core/config/watcher/ConfigWatcher.cpp +++ b/core/config/watcher/ConfigWatcher.cpp @@ -19,7 +19,8 @@ #include #include "logger/Logger.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" +#include "pipeline/ProcessConfigManager.h" using namespace std; @@ -27,35 +28,42 @@ namespace logtail { bool ReadFile(const string& filepath, string& content); -ConfigWatcher::ConfigWatcher() : mPipelineManager(PipelineManager::GetInstance()) { +ConfigWatcher::ConfigWatcher() + : mPipelineManager(PipelineManager::GetInstance()), mProcessConfigManager(ProcessConfigManager::GetInstance()) { } -ConfigDiff ConfigWatcher::CheckConfigDiff() { - ConfigDiff diff; +template +ConfigDiffType ConfigWatcher::CheckConfigDiff( + const std::vector& configDir, + const std::unordered_map& configDirMutexMap, + std::map>& fileInfoMap, + const ConfigManagerType* configManager, + const std::string& configType) { + ConfigDiffType diff; unordered_set configSet; - for (const auto& dir : mSourceDir) { + for (const auto& dir : configDir) { error_code ec; filesystem::file_status s = filesystem::status(dir, ec); if (ec) { LOG_WARNING(sLogger, ("failed to get config dir path info", "skip current object")("dir path", dir.string())( - "error code", ec.value())("error msg", ec.message())); + "error code", ec.value())("error msg", ec.message())("configType", configType)); continue; } if (!filesystem::exists(s)) { - LOG_WARNING(sLogger, ("config dir path not existed", "skip current object")("dir path", dir.string())); + LOG_WARNING(sLogger, ("config dir path not existed", "skip current object")("dir path", dir.string())("configType", configType)); continue; } if (!filesystem::is_directory(s)) { LOG_WARNING(sLogger, - ("config dir path is not a directory", "skip current object")("dir path", dir.string())); + ("config dir path is not a directory", "skip current object")("dir path", dir.string())("configType", configType)); continue; } for (auto const& entry : filesystem::directory_iterator(dir, ec)) { // lock the dir if it is provided by config provider unique_lock lock; - auto itr = mDirMutexMap.find(dir.string()); - if (itr != mDirMutexMap.end()) { + auto itr = configDirMutexMap.find(dir.string()); + if (itr != configDirMutexMap.end()) { lock = unique_lock(*itr->second, defer_lock); lock.lock(); } @@ -64,36 +72,36 @@ ConfigDiff ConfigWatcher::CheckConfigDiff() { const string& configName = path.stem().string(); const string& filepath = path.string(); if (!filesystem::is_regular_file(entry.status(ec))) { - LOG_DEBUG(sLogger, ("config file is not a regular file", "skip current object")("filepath", filepath)); + LOG_DEBUG(sLogger, ("config file is not a regular file", "skip current object")("filepath", filepath)("configType", configType)); continue; } if (configSet.find(configName) != configSet.end()) { LOG_WARNING( sLogger, - ("more than 1 config with the same name is found", "skip current config")("filepath", filepath)); + ("more than 1 config with the same name is found", "skip current config")("filepath", filepath)("configType", configType)); continue; } configSet.insert(configName); - auto iter = mFileInfoMap.find(filepath); + auto iter = fileInfoMap.find(filepath); uintmax_t size = filesystem::file_size(path, ec); filesystem::file_time_type mTime = filesystem::last_write_time(path, ec); - if (iter == mFileInfoMap.end()) { - mFileInfoMap[filepath] = make_pair(size, mTime); + if (iter == fileInfoMap.end()) { + fileInfoMap[filepath] = make_pair(size, mTime); unique_ptr detail = unique_ptr(new Json::Value()); if (!LoadConfigDetailFromFile(path, *detail)) { continue; } if (!IsConfigEnabled(configName, *detail)) { - LOG_INFO(sLogger, ("new config found and disabled", "skip current object")("config", configName)); + LOG_INFO(sLogger, ("new config found and disabled", "skip current object")("config", configName)("configType", configType)); continue; } - Config config(configName, std::move(detail)); + ConfigType config(configName, std::move(detail)); if (!config.Parse()) { - LOG_ERROR(sLogger, ("new config found but invalid", "skip current object")("config", configName)); + LOG_ERROR(sLogger, ("new config found but invalid", "skip current object")("config", configName)("configType", configType)); LogtailAlarm::GetInstance()->SendAlarm(CATEGORY_CONFIG_ALARM, "new config found but invalid: skip current object, config: " - + configName, + + configName + ", configType: " + configType, config.mProject, config.mLogstore, config.mRegion); @@ -102,41 +110,41 @@ ConfigDiff ConfigWatcher::CheckConfigDiff() { diff.mAdded.push_back(std::move(config)); LOG_INFO( sLogger, - ("new config found and passed topology check", "prepare to build pipeline")("config", configName)); + ("new config found and passed topology check", "prepare to build config")("config", configName)("configType", configType)); } else if (iter->second.first != size || iter->second.second != mTime) { // for config currently running, we leave it untouched if new config is invalid - mFileInfoMap[filepath] = make_pair(size, mTime); + fileInfoMap[filepath] = make_pair(size, mTime); unique_ptr detail = unique_ptr(new Json::Value()); if (!LoadConfigDetailFromFile(path, *detail)) { - if (mPipelineManager->FindPipelineByName(configName)) { + if (configManager->FindConfigByName(configName)) { diff.mUnchanged.push_back(configName); } continue; } if (!IsConfigEnabled(configName, *detail)) { - if (mPipelineManager->FindPipelineByName(configName)) { + if (configManager->FindConfigByName(configName)) { diff.mRemoved.push_back(configName); LOG_INFO(sLogger, ("existing valid config modified and disabled", - "prepare to stop current running pipeline")("config", configName)); + "prepare to stop current running config")("config", configName)("configType", configType)); } else { LOG_INFO(sLogger, ("existing invalid config modified and disabled", "skip current object")("config", - configName)); + configName)("configType", configType)); } continue; } - shared_ptr p = mPipelineManager->FindPipelineByName(configName); + shared_ptr p = configManager->FindConfigByName(configName); if (!p) { - Config config(configName, std::move(detail)); + ConfigType config(configName, std::move(detail)); if (!config.Parse()) { LOG_ERROR(sLogger, - ("existing invalid config modified and remains invalid", - "skip current object")("config", configName)); + ("existing invalid config modified and remains invalid", + "skip current object")("config", configName)("configType", configType)); LogtailAlarm::GetInstance()->SendAlarm( CATEGORY_CONFIG_ALARM, "existing invalid config modified and remains invalid: skip current object, config: " - + configName, + + configName + ", configType: " + configType, config.mProject, config.mLogstore, config.mRegion); @@ -145,18 +153,18 @@ ConfigDiff ConfigWatcher::CheckConfigDiff() { diff.mAdded.push_back(std::move(config)); LOG_INFO(sLogger, ("existing invalid config modified and passed topology check", - "prepare to build pipeline")("config", configName)); + "prepare to build config")("config", configName)("configType", configType)); } else if (*detail != p->GetConfig()) { - Config config(configName, std::move(detail)); + ConfigType config(configName, std::move(detail)); if (!config.Parse()) { diff.mUnchanged.push_back(configName); LOG_ERROR(sLogger, - ("existing valid config modified and becomes invalid", - "keep current pipeline running")("config", configName)); + ("existing valid config modified and becomes invalid", + "keep current config running")("config", configName)("configType", configType)); LogtailAlarm::GetInstance()->SendAlarm( CATEGORY_CONFIG_ALARM, "existing valid config modified and becomes invalid: skip current object, config: " - + configName, + + configName + ", configType: " + configType, config.mProject, config.mLogstore, config.mRegion); @@ -165,56 +173,87 @@ ConfigDiff ConfigWatcher::CheckConfigDiff() { diff.mModified.push_back(std::move(config)); LOG_INFO(sLogger, ("existing valid config modified and passed topology check", - "prepare to rebuild pipeline")("config", configName)); + "prepare to rebuild config")("config", configName)("configType", configType)); } else { diff.mUnchanged.push_back(configName); LOG_DEBUG(sLogger, - ("existing valid config file modified, but no change found", "skip current object")); + ("existing valid config file modified, but no change found", "skip current object")("configType", configType)); } } else { // 为了插件系统过渡使用 - if (mPipelineManager->FindPipelineByName(configName)) { + if (configManager->FindConfigByName(configName)) { diff.mUnchanged.push_back(configName); } - LOG_DEBUG(sLogger, ("existing config file unchanged", "skip current object")); + LOG_DEBUG(sLogger, ("existing config file unchanged", "skip current object")("configType", configType)); } } } - for (const auto& name : mPipelineManager->GetAllPipelineNames()) { + for (const auto& name : configManager->GetAllConfigNames()) { if (configSet.find(name) == configSet.end()) { diff.mRemoved.push_back(name); LOG_INFO(sLogger, - ("existing valid config is removed", "prepare to stop current running pipeline")("config", name)); + ("existing valid config is removed", "prepare to stop current running config")("config", name)("configType", configType)); } } - for (const auto& item : mFileInfoMap) { + for (const auto& item : fileInfoMap) { string configName = filesystem::path(item.first).stem().string(); if (configSet.find(configName) == configSet.end()) { - mFileInfoMap.erase(item.first); + fileInfoMap.erase(item.first); } } if (!diff.IsEmpty()) { LOG_INFO(sLogger, - ("config files scan done", "got updates, begin to update pipelines")("added", diff.mAdded.size())( - "modified", diff.mModified.size())("removed", diff.mRemoved.size())); + ("config files scan done", "got updates, begin to update configs")("added", diff.mAdded.size())( + "modified", diff.mModified.size())("removed", diff.mRemoved.size())("configType", configType)); } else { - LOG_DEBUG(sLogger, ("config files scan done", "no update")); + LOG_DEBUG(sLogger, ("config files scan done", "no update")("configType", configType)); } return diff; } -void ConfigWatcher::AddSource(const string& dir, mutex* mux) { - mSourceDir.emplace_back(dir); +PipelineConfigDiff ConfigWatcher::CheckPipelineConfigDiff() { + const static std::string configType = "pipelineConfig"; + return CheckConfigDiff( + mPipelineConfigDir, mPipelineConfigDirMutexMap, mPipelineFileInfoMap, mPipelineManager, configType); +} + +ProcessConfigDiff ConfigWatcher::CheckProcessConfigDiff() { + const static std::string configType = "processConfig"; + return CheckConfigDiff( + mProcessConfigDir, mProcessConfigDirMutexMap, mProcessFileInfoMap, mProcessConfigManager, configType); +} + +void ConfigWatcher::AddPipelineSource(const string& dir, mutex* mux) { + mPipelineConfigDir.emplace_back(dir); + if (mux != nullptr) { + mPipelineConfigDirMutexMap[dir] = mux; + } +} + +void ConfigWatcher::AddProcessSource(const string& dir, mutex* mux) { + mProcessConfigDir.emplace_back(dir); if (mux != nullptr) { - mDirMutexMap[dir] = mux; + mProcessConfigDirMutexMap[dir] = mux; + } +} + +void ConfigWatcher::AddCommandSource(const string& dir, mutex* mux) { + mCommandConfigDir.emplace_back(dir); + if (mux != nullptr) { + mCommandConfigDirMutexMap[dir] = mux; } } void ConfigWatcher::ClearEnvironment() { - mSourceDir.clear(); - mFileInfoMap.clear(); + mPipelineConfigDir.clear(); + mPipelineFileInfoMap.clear(); + + mProcessConfigDir.clear(); + mProcessFileInfoMap.clear(); + + mCommandConfigDir.clear(); } } // namespace logtail diff --git a/core/config/watcher/ConfigWatcher.h b/core/config/watcher/ConfigWatcher.h index 7a5a2c1791..8fea31ef93 100644 --- a/core/config/watcher/ConfigWatcher.h +++ b/core/config/watcher/ConfigWatcher.h @@ -23,12 +23,14 @@ #include #include -#include "config/Config.h" #include "config/ConfigDiff.h" +#include "config/PipelineConfig.h" +#include "config/ProcessConfig.h" namespace logtail { class PipelineManager; +class ProcessConfigManager; class ConfigWatcher { public: @@ -40,20 +42,46 @@ class ConfigWatcher { return &instance; } - ConfigDiff CheckConfigDiff(); - void AddSource(const std::string& dir, std::mutex* mux = nullptr); + PipelineConfigDiff CheckPipelineConfigDiff(); + ProcessConfigDiff CheckProcessConfigDiff(); + + void AddPipelineSource(const std::string& dir, std::mutex* mux = nullptr); + void AddProcessSource(const std::string& dir, std::mutex* mux = nullptr); + void AddCommandSource(const std::string& dir, std::mutex* mux = nullptr); + // for ut void SetPipelineManager(const PipelineManager* pm) { mPipelineManager = pm; } + void SetProcessConfigManager(const ProcessConfigManager* pm) { mProcessConfigManager = pm; } void ClearEnvironment(); private: ConfigWatcher(); ~ConfigWatcher() = default; - std::vector mSourceDir; - std::unordered_map mDirMutexMap; - std::map> mFileInfoMap; + template + ConfigDiffType + CheckConfigDiff(const std::vector& configDir, + const std::unordered_map& configDirMutexMap, + std::map>& fileInfoMap, + const ConfigManagerType* configManager, + const std::string& configType); + + std::vector mPipelineConfigDir; + std::unordered_map mPipelineConfigDirMutexMap; + + std::vector mProcessConfigDir; + std::unordered_map mProcessConfigDirMutexMap; + + std::vector mCommandConfigDir; + std::unordered_map mCommandConfigDirMutexMap; + + std::map> mPipelineFileInfoMap; const PipelineManager* mPipelineManager = nullptr; + + std::map> mProcessFileInfoMap; + const ProcessConfigManager* mProcessConfigManager = nullptr; + + bool CheckDirectoryStatus(const std::filesystem::path& dir); }; } // namespace logtail diff --git a/core/config_manager/ConfigManager.cpp b/core/config_manager/ConfigManager.cpp index 0c9c62b940..d2d125a144 100644 --- a/core/config_manager/ConfigManager.cpp +++ b/core/config_manager/ConfigManager.cpp @@ -54,7 +54,7 @@ #include "monitor/LogLineCount.h" #include "monitor/LogtailAlarm.h" #include "pipeline/Pipeline.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "processor/daemon/LogProcess.h" #include "sender/Sender.h" diff --git a/core/config_server_pb/agent.pb.cc b/core/config_server_pb/v1/agent.pb.cc similarity index 95% rename from core/config_server_pb/agent.pb.cc rename to core/config_server_pb/v1/agent.pb.cc index e1536be261..7aae488269 100644 --- a/core/config_server_pb/agent.pb.cc +++ b/core/config_server_pb/v1/agent.pb.cc @@ -13,7 +13,7 @@ // limitations under the License. // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: agent.proto +// source: v1/agent.proto #include "agent.pb.h" @@ -33,15 +33,15 @@ #endif // @@protoc_insertion_point(includes) -namespace protobuf_agent_2eproto { -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AgentAttributes_ExtrasEntry_DoNotUse; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Command_ArgsEntry_DoNotUse; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigCheckResult; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigDetail; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigInfo; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AgentAttributes; -extern PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Command; -} // namespace protobuf_agent_2eproto +namespace protobuf_v1_2fagent_2eproto { +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AgentAttributes_ExtrasEntry_DoNotUse; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Command_ArgsEntry_DoNotUse; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigCheckResult; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigDetail; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigInfo; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AgentAttributes; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Command; +} // namespace protobuf_v1_2fagent_2eproto namespace configserver { namespace proto { class ConfigInfoDefaultTypeInternal { @@ -111,7 +111,7 @@ class FetchAgentConfigResponseDefaultTypeInternal { } _FetchAgentConfigResponse_default_instance_; } // namespace proto } // namespace configserver -namespace protobuf_agent_2eproto { +namespace protobuf_v1_2fagent_2eproto { static void InitDefaultsConfigInfo() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -180,7 +180,7 @@ static void InitDefaultsAgentAttributes() { ::google::protobuf::internal::SCCInfo<1> scc_info_AgentAttributes = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAgentAttributes}, { - &protobuf_agent_2eproto::scc_info_AgentAttributes_ExtrasEntry_DoNotUse.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_AgentAttributes_ExtrasEntry_DoNotUse.base,}}; static void InitDefaultsCommand_ArgsEntry_DoNotUse() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -208,7 +208,7 @@ static void InitDefaultsCommand() { ::google::protobuf::internal::SCCInfo<1> scc_info_Command = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCommand}, { - &protobuf_agent_2eproto::scc_info_Command_ArgsEntry_DoNotUse.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_Command_ArgsEntry_DoNotUse.base,}}; static void InitDefaultsHeartBeatRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -223,8 +223,8 @@ static void InitDefaultsHeartBeatRequest() { ::google::protobuf::internal::SCCInfo<2> scc_info_HeartBeatRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsHeartBeatRequest}, { - &protobuf_agent_2eproto::scc_info_AgentAttributes.base, - &protobuf_agent_2eproto::scc_info_ConfigInfo.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_AgentAttributes.base, + &protobuf_v1_2fagent_2eproto::scc_info_ConfigInfo.base,}}; static void InitDefaultsHeartBeatResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -239,8 +239,8 @@ static void InitDefaultsHeartBeatResponse() { ::google::protobuf::internal::SCCInfo<2> scc_info_HeartBeatResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsHeartBeatResponse}, { - &protobuf_agent_2eproto::scc_info_ConfigCheckResult.base, - &protobuf_agent_2eproto::scc_info_Command.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_ConfigCheckResult.base, + &protobuf_v1_2fagent_2eproto::scc_info_Command.base,}}; static void InitDefaultsFetchPipelineConfigRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -255,7 +255,7 @@ static void InitDefaultsFetchPipelineConfigRequest() { ::google::protobuf::internal::SCCInfo<1> scc_info_FetchPipelineConfigRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFetchPipelineConfigRequest}, { - &protobuf_agent_2eproto::scc_info_ConfigInfo.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_ConfigInfo.base,}}; static void InitDefaultsFetchPipelineConfigResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -270,7 +270,7 @@ static void InitDefaultsFetchPipelineConfigResponse() { ::google::protobuf::internal::SCCInfo<1> scc_info_FetchPipelineConfigResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFetchPipelineConfigResponse}, { - &protobuf_agent_2eproto::scc_info_ConfigDetail.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_ConfigDetail.base,}}; static void InitDefaultsFetchAgentConfigRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -285,8 +285,8 @@ static void InitDefaultsFetchAgentConfigRequest() { ::google::protobuf::internal::SCCInfo<2> scc_info_FetchAgentConfigRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsFetchAgentConfigRequest}, { - &protobuf_agent_2eproto::scc_info_AgentAttributes.base, - &protobuf_agent_2eproto::scc_info_ConfigInfo.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_AgentAttributes.base, + &protobuf_v1_2fagent_2eproto::scc_info_ConfigInfo.base,}}; static void InitDefaultsFetchAgentConfigResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -301,7 +301,7 @@ static void InitDefaultsFetchAgentConfigResponse() { ::google::protobuf::internal::SCCInfo<1> scc_info_FetchAgentConfigResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFetchAgentConfigResponse}, { - &protobuf_agent_2eproto::scc_info_ConfigDetail.base,}}; + &protobuf_v1_2fagent_2eproto::scc_info_ConfigDetail.base,}}; void InitDefaults() { ::google::protobuf::internal::InitSCC(&scc_info_ConfigInfo.base); @@ -489,7 +489,7 @@ static ::google::protobuf::Message const * const file_default_instances[] = { void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( - "agent.proto", schemas, file_default_instances, TableStruct::offsets, + "v1/agent.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, file_level_enum_descriptors, NULL); } @@ -507,69 +507,69 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\013agent.proto\022\022configserver.proto\"j\n\nCon" - "figInfo\022,\n\004type\030\001 \001(\0162\036.configserver.pro" - "to.ConfigType\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003" - " \001(\003\022\017\n\007context\030\004 \001(\t\"\301\001\n\021ConfigCheckRes" - "ult\022,\n\004type\030\001 \001(\0162\036.configserver.proto.C" - "onfigType\022\014\n\004name\030\002 \001(\t\022\023\n\013old_version\030\003" - " \001(\003\022\023\n\013new_version\030\004 \001(\003\022\017\n\007context\030\005 \001" - "(\t\0225\n\014check_status\030\006 \001(\0162\037.configserver." - "proto.CheckStatus\"|\n\014ConfigDetail\022,\n\004typ" - "e\030\001 \001(\0162\036.configserver.proto.ConfigType\022" - "\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003 \001(\003\022\017\n\007contex" - "t\030\004 \001(\t\022\016\n\006detail\030\005 \001(\t\"\340\001\n\017AgentAttribu" - "tes\022\017\n\007version\030\001 \001(\t\022\020\n\010category\030\002 \001(\t\022\n" - "\n\002ip\030\003 \001(\t\022\020\n\010hostname\030\004 \001(\t\022\016\n\006region\030\005" - " \001(\t\022\014\n\004zone\030\006 \001(\t\022\?\n\006extras\030d \003(\0132/.con" - "figserver.proto.AgentAttributes.ExtrasEn" - "try\032-\n\013ExtrasEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - "\030\002 \001(\t:\0028\001\"\223\001\n\007Command\022\014\n\004type\030\001 \001(\t\022\014\n\004" - "name\030\002 \001(\t\022\n\n\002id\030\003 \001(\t\0223\n\004args\030\004 \003(\0132%.c" - "onfigserver.proto.Command.ArgsEntry\032+\n\tA" - "rgsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - "\"\304\002\n\020HeartBeatRequest\022\022\n\nrequest_id\030\001 \001(" - "\t\022\020\n\010agent_id\030\002 \001(\t\022\022\n\nagent_type\030\003 \001(\t\022" - "7\n\nattributes\030\004 \001(\0132#.configserver.proto" - ".AgentAttributes\022\014\n\004tags\030\005 \003(\t\022\026\n\016runnin" - "g_status\030\006 \001(\t\022\024\n\014startup_time\030\007 \001(\003\022\020\n\010" - "interval\030\010 \001(\005\0228\n\020pipeline_configs\030\t \003(\013" - "2\036.configserver.proto.ConfigInfo\0225\n\ragen" - "t_configs\030\n \003(\0132\036.configserver.proto.Con" - "figInfo\"\245\002\n\021HeartBeatResponse\022\022\n\nrequest" - "_id\030\001 \001(\t\022*\n\004code\030\002 \001(\0162\034.configserver.p" - "roto.RespCode\022\017\n\007message\030\003 \001(\t\022E\n\026pipeli" - "ne_check_results\030\004 \003(\0132%.configserver.pr" - "oto.ConfigCheckResult\022B\n\023agent_check_res" - "ults\030\005 \003(\0132%.configserver.proto.ConfigCh" - "eckResult\0224\n\017custom_commands\030\006 \003(\0132\033.con" - "figserver.proto.Command\"w\n\032FetchPipeline" - "ConfigRequest\022\022\n\nrequest_id\030\001 \001(\t\022\020\n\010age" - "nt_id\030\002 \001(\t\0223\n\013req_configs\030\003 \003(\0132\036.confi" - "gserver.proto.ConfigInfo\"\250\001\n\033FetchPipeli" - "neConfigResponse\022\022\n\nrequest_id\030\001 \001(\t\022*\n\004" - "code\030\002 \001(\0162\034.configserver.proto.RespCode" - "\022\017\n\007message\030\003 \001(\t\0228\n\016config_details\030\004 \003(" - "\0132 .configserver.proto.ConfigDetail\"\255\001\n\027" - "FetchAgentConfigRequest\022\022\n\nrequest_id\030\001 " - "\001(\t\022\020\n\010agent_id\030\002 \001(\t\0227\n\nattributes\030\003 \001(" - "\0132#.configserver.proto.AgentAttributes\0223" - "\n\013req_configs\030\004 \003(\0132\036.configserver.proto" - ".ConfigInfo\"\245\001\n\030FetchAgentConfigResponse" - "\022\022\n\nrequest_id\030\001 \001(\t\022*\n\004code\030\002 \001(\0162\034.con" - "figserver.proto.RespCode\022\017\n\007message\030\003 \001(" - "\t\0228\n\016config_details\030\004 \003(\0132 .configserver" - ".proto.ConfigDetail*3\n\nConfigType\022\023\n\017PIP" - "ELINE_CONFIG\020\000\022\020\n\014AGENT_CONFIG\020\001*1\n\013Chec" - "kStatus\022\007\n\003NEW\020\000\022\013\n\007DELETED\020\001\022\014\n\010MODIFIE" - "D\020\002*H\n\010RespCode\022\n\n\006ACCEPT\020\000\022\025\n\021INVALID_P" - "ARAMETER\020\001\022\031\n\025INTERNAL_SERVER_ERROR\020\002B\026Z" - "\024.;configserver_protob\006proto3" + "\n\016v1/agent.proto\022\022configserver.proto\"j\n\n" + "ConfigInfo\022,\n\004type\030\001 \001(\0162\036.configserver." + "proto.ConfigType\022\014\n\004name\030\002 \001(\t\022\017\n\007versio" + "n\030\003 \001(\003\022\017\n\007context\030\004 \001(\t\"\301\001\n\021ConfigCheck" + "Result\022,\n\004type\030\001 \001(\0162\036.configserver.prot" + "o.ConfigType\022\014\n\004name\030\002 \001(\t\022\023\n\013old_versio" + "n\030\003 \001(\003\022\023\n\013new_version\030\004 \001(\003\022\017\n\007context\030" + "\005 \001(\t\0225\n\014check_status\030\006 \001(\0162\037.configserv" + "er.proto.CheckStatus\"|\n\014ConfigDetail\022,\n\004" + "type\030\001 \001(\0162\036.configserver.proto.ConfigTy" + "pe\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003 \001(\003\022\017\n\007con" + "text\030\004 \001(\t\022\016\n\006detail\030\005 \001(\t\"\340\001\n\017AgentAttr" + "ibutes\022\017\n\007version\030\001 \001(\t\022\020\n\010category\030\002 \001(" + "\t\022\n\n\002ip\030\003 \001(\t\022\020\n\010hostname\030\004 \001(\t\022\016\n\006regio" + "n\030\005 \001(\t\022\014\n\004zone\030\006 \001(\t\022\?\n\006extras\030d \003(\0132/." + "configserver.proto.AgentAttributes.Extra" + "sEntry\032-\n\013ExtrasEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + "lue\030\002 \001(\t:\0028\001\"\223\001\n\007Command\022\014\n\004type\030\001 \001(\t\022" + "\014\n\004name\030\002 \001(\t\022\n\n\002id\030\003 \001(\t\0223\n\004args\030\004 \003(\0132" + "%.configserver.proto.Command.ArgsEntry\032+" + "\n\tArgsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + "\0028\001\"\304\002\n\020HeartBeatRequest\022\022\n\nrequest_id\030\001" + " \001(\t\022\020\n\010agent_id\030\002 \001(\t\022\022\n\nagent_type\030\003 \001" + "(\t\0227\n\nattributes\030\004 \001(\0132#.configserver.pr" + "oto.AgentAttributes\022\014\n\004tags\030\005 \003(\t\022\026\n\016run" + "ning_status\030\006 \001(\t\022\024\n\014startup_time\030\007 \001(\003\022" + "\020\n\010interval\030\010 \001(\005\0228\n\020pipeline_configs\030\t " + "\003(\0132\036.configserver.proto.ConfigInfo\0225\n\ra" + "gent_configs\030\n \003(\0132\036.configserver.proto." + "ConfigInfo\"\245\002\n\021HeartBeatResponse\022\022\n\nrequ" + "est_id\030\001 \001(\t\022*\n\004code\030\002 \001(\0162\034.configserve" + "r.proto.RespCode\022\017\n\007message\030\003 \001(\t\022E\n\026pip" + "eline_check_results\030\004 \003(\0132%.configserver" + ".proto.ConfigCheckResult\022B\n\023agent_check_" + "results\030\005 \003(\0132%.configserver.proto.Confi" + "gCheckResult\0224\n\017custom_commands\030\006 \003(\0132\033." + "configserver.proto.Command\"w\n\032FetchPipel" + "ineConfigRequest\022\022\n\nrequest_id\030\001 \001(\t\022\020\n\010" + "agent_id\030\002 \001(\t\0223\n\013req_configs\030\003 \003(\0132\036.co" + "nfigserver.proto.ConfigInfo\"\250\001\n\033FetchPip" + "elineConfigResponse\022\022\n\nrequest_id\030\001 \001(\t\022" + "*\n\004code\030\002 \001(\0162\034.configserver.proto.RespC" + "ode\022\017\n\007message\030\003 \001(\t\0228\n\016config_details\030\004" + " \003(\0132 .configserver.proto.ConfigDetail\"\255" + "\001\n\027FetchAgentConfigRequest\022\022\n\nrequest_id" + "\030\001 \001(\t\022\020\n\010agent_id\030\002 \001(\t\0227\n\nattributes\030\003" + " \001(\0132#.configserver.proto.AgentAttribute" + "s\0223\n\013req_configs\030\004 \003(\0132\036.configserver.pr" + "oto.ConfigInfo\"\245\001\n\030FetchAgentConfigRespo" + "nse\022\022\n\nrequest_id\030\001 \001(\t\022*\n\004code\030\002 \001(\0162\034." + "configserver.proto.RespCode\022\017\n\007message\030\003" + " \001(\t\0228\n\016config_details\030\004 \003(\0132 .configser" + "ver.proto.ConfigDetail*3\n\nConfigType\022\023\n\017" + "PIPELINE_CONFIG\020\000\022\020\n\014AGENT_CONFIG\020\001*1\n\013C" + "heckStatus\022\007\n\003NEW\020\000\022\013\n\007DELETED\020\001\022\014\n\010MODI" + "FIED\020\002*H\n\010RespCode\022\n\n\006ACCEPT\020\000\022\025\n\021INVALI" + "D_PARAMETER\020\001\022\031\n\025INTERNAL_SERVER_ERROR\020\002" + "B\026Z\024.;configserver_protob\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 2309); + descriptor, 2312); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "agent.proto", &protobuf_RegisterTypes); + "v1/agent.proto", &protobuf_RegisterTypes); } void AddDescriptors() { @@ -582,12 +582,12 @@ struct StaticDescriptorInitializer { AddDescriptors(); } } static_descriptor_initializer; -} // namespace protobuf_agent_2eproto +} // namespace protobuf_v1_2fagent_2eproto namespace configserver { namespace proto { const ::google::protobuf::EnumDescriptor* ConfigType_descriptor() { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_agent_2eproto::file_level_enum_descriptors[0]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v1_2fagent_2eproto::file_level_enum_descriptors[0]; } bool ConfigType_IsValid(int value) { switch (value) { @@ -600,8 +600,8 @@ bool ConfigType_IsValid(int value) { } const ::google::protobuf::EnumDescriptor* CheckStatus_descriptor() { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_agent_2eproto::file_level_enum_descriptors[1]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v1_2fagent_2eproto::file_level_enum_descriptors[1]; } bool CheckStatus_IsValid(int value) { switch (value) { @@ -615,8 +615,8 @@ bool CheckStatus_IsValid(int value) { } const ::google::protobuf::EnumDescriptor* RespCode_descriptor() { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_agent_2eproto::file_level_enum_descriptors[2]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v1_2fagent_2eproto::file_level_enum_descriptors[2]; } bool RespCode_IsValid(int value) { switch (value) { @@ -644,7 +644,7 @@ const int ConfigInfo::kContextFieldNumber; ConfigInfo::ConfigInfo() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_ConfigInfo.base); + &protobuf_v1_2fagent_2eproto::scc_info_ConfigInfo.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.ConfigInfo) } @@ -688,12 +688,12 @@ void ConfigInfo::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ConfigInfo::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ConfigInfo& ConfigInfo::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_ConfigInfo.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_ConfigInfo.base); return *internal_default_instance(); } @@ -1008,8 +1008,8 @@ void ConfigInfo::InternalSwap(ConfigInfo* other) { } ::google::protobuf::Metadata ConfigInfo::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1029,7 +1029,7 @@ const int ConfigCheckResult::kCheckStatusFieldNumber; ConfigCheckResult::ConfigCheckResult() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_ConfigCheckResult.base); + &protobuf_v1_2fagent_2eproto::scc_info_ConfigCheckResult.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.ConfigCheckResult) } @@ -1073,12 +1073,12 @@ void ConfigCheckResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ConfigCheckResult::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ConfigCheckResult& ConfigCheckResult::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_ConfigCheckResult.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_ConfigCheckResult.base); return *internal_default_instance(); } @@ -1465,8 +1465,8 @@ void ConfigCheckResult::InternalSwap(ConfigCheckResult* other) { } ::google::protobuf::Metadata ConfigCheckResult::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1485,7 +1485,7 @@ const int ConfigDetail::kDetailFieldNumber; ConfigDetail::ConfigDetail() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_ConfigDetail.base); + &protobuf_v1_2fagent_2eproto::scc_info_ConfigDetail.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.ConfigDetail) } @@ -1535,12 +1535,12 @@ void ConfigDetail::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ConfigDetail::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ConfigDetail& ConfigDetail::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_ConfigDetail.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_ConfigDetail.base); return *internal_default_instance(); } @@ -1906,8 +1906,8 @@ void ConfigDetail::InternalSwap(ConfigDetail* other) { } ::google::protobuf::Metadata ConfigDetail::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1919,8 +1919,8 @@ void AgentAttributes_ExtrasEntry_DoNotUse::MergeFrom(const AgentAttributes_Extra MergeFromInternal(other); } ::google::protobuf::Metadata AgentAttributes_ExtrasEntry_DoNotUse::GetMetadata() const { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[3]; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[3]; } void AgentAttributes_ExtrasEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -1945,7 +1945,7 @@ const int AgentAttributes::kExtrasFieldNumber; AgentAttributes::AgentAttributes() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_AgentAttributes.base); + &protobuf_v1_2fagent_2eproto::scc_info_AgentAttributes.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.AgentAttributes) } @@ -2008,12 +2008,12 @@ void AgentAttributes::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* AgentAttributes::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const AgentAttributes& AgentAttributes::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_AgentAttributes.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_AgentAttributes.base); return *internal_default_instance(); } @@ -2611,8 +2611,8 @@ void AgentAttributes::InternalSwap(AgentAttributes* other) { } ::google::protobuf::Metadata AgentAttributes::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -2624,8 +2624,8 @@ void Command_ArgsEntry_DoNotUse::MergeFrom(const Command_ArgsEntry_DoNotUse& oth MergeFromInternal(other); } ::google::protobuf::Metadata Command_ArgsEntry_DoNotUse::GetMetadata() const { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[5]; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[5]; } void Command_ArgsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -2647,7 +2647,7 @@ const int Command::kArgsFieldNumber; Command::Command() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_Command.base); + &protobuf_v1_2fagent_2eproto::scc_info_Command.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.Command) } @@ -2692,12 +2692,12 @@ void Command::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* Command::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Command& Command::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_Command.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_Command.base); return *internal_default_instance(); } @@ -3142,8 +3142,8 @@ void Command::InternalSwap(Command* other) { } ::google::protobuf::Metadata Command::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -3169,7 +3169,7 @@ const int HeartBeatRequest::kAgentConfigsFieldNumber; HeartBeatRequest::HeartBeatRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_HeartBeatRequest.base); + &protobuf_v1_2fagent_2eproto::scc_info_HeartBeatRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.HeartBeatRequest) } @@ -3234,12 +3234,12 @@ void HeartBeatRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* HeartBeatRequest::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const HeartBeatRequest& HeartBeatRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_HeartBeatRequest.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_HeartBeatRequest.base); return *internal_default_instance(); } @@ -3828,8 +3828,8 @@ void HeartBeatRequest::InternalSwap(HeartBeatRequest* other) { } ::google::protobuf::Metadata HeartBeatRequest::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -3849,7 +3849,7 @@ const int HeartBeatResponse::kCustomCommandsFieldNumber; HeartBeatResponse::HeartBeatResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_HeartBeatResponse.base); + &protobuf_v1_2fagent_2eproto::scc_info_HeartBeatResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.HeartBeatResponse) } @@ -3892,12 +3892,12 @@ void HeartBeatResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* HeartBeatResponse::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const HeartBeatResponse& HeartBeatResponse::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_HeartBeatResponse.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_HeartBeatResponse.base); return *internal_default_instance(); } @@ -4304,8 +4304,8 @@ void HeartBeatResponse::InternalSwap(HeartBeatResponse* other) { } ::google::protobuf::Metadata HeartBeatResponse::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -4322,7 +4322,7 @@ const int FetchPipelineConfigRequest::kReqConfigsFieldNumber; FetchPipelineConfigRequest::FetchPipelineConfigRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_FetchPipelineConfigRequest.base); + &protobuf_v1_2fagent_2eproto::scc_info_FetchPipelineConfigRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.FetchPipelineConfigRequest) } @@ -4361,12 +4361,12 @@ void FetchPipelineConfigRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* FetchPipelineConfigRequest::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const FetchPipelineConfigRequest& FetchPipelineConfigRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_FetchPipelineConfigRequest.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_FetchPipelineConfigRequest.base); return *internal_default_instance(); } @@ -4649,8 +4649,8 @@ void FetchPipelineConfigRequest::InternalSwap(FetchPipelineConfigRequest* other) } ::google::protobuf::Metadata FetchPipelineConfigRequest::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -4668,7 +4668,7 @@ const int FetchPipelineConfigResponse::kConfigDetailsFieldNumber; FetchPipelineConfigResponse::FetchPipelineConfigResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_FetchPipelineConfigResponse.base); + &protobuf_v1_2fagent_2eproto::scc_info_FetchPipelineConfigResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.FetchPipelineConfigResponse) } @@ -4709,12 +4709,12 @@ void FetchPipelineConfigResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* FetchPipelineConfigResponse::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const FetchPipelineConfigResponse& FetchPipelineConfigResponse::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_FetchPipelineConfigResponse.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_FetchPipelineConfigResponse.base); return *internal_default_instance(); } @@ -5035,8 +5035,8 @@ void FetchPipelineConfigResponse::InternalSwap(FetchPipelineConfigResponse* othe } ::google::protobuf::Metadata FetchPipelineConfigResponse::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -5056,7 +5056,7 @@ const int FetchAgentConfigRequest::kReqConfigsFieldNumber; FetchAgentConfigRequest::FetchAgentConfigRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_FetchAgentConfigRequest.base); + &protobuf_v1_2fagent_2eproto::scc_info_FetchAgentConfigRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.FetchAgentConfigRequest) } @@ -5102,12 +5102,12 @@ void FetchAgentConfigRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* FetchAgentConfigRequest::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const FetchAgentConfigRequest& FetchAgentConfigRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_FetchAgentConfigRequest.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_FetchAgentConfigRequest.base); return *internal_default_instance(); } @@ -5430,8 +5430,8 @@ void FetchAgentConfigRequest::InternalSwap(FetchAgentConfigRequest* other) { } ::google::protobuf::Metadata FetchAgentConfigRequest::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -5449,7 +5449,7 @@ const int FetchAgentConfigResponse::kConfigDetailsFieldNumber; FetchAgentConfigResponse::FetchAgentConfigResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( - &protobuf_agent_2eproto::scc_info_FetchAgentConfigResponse.base); + &protobuf_v1_2fagent_2eproto::scc_info_FetchAgentConfigResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:configserver.proto.FetchAgentConfigResponse) } @@ -5490,12 +5490,12 @@ void FetchAgentConfigResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* FetchAgentConfigResponse::descriptor() { - ::protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const FetchAgentConfigResponse& FetchAgentConfigResponse::default_instance() { - ::google::protobuf::internal::InitSCC(&protobuf_agent_2eproto::scc_info_FetchAgentConfigResponse.base); + ::google::protobuf::internal::InitSCC(&protobuf_v1_2fagent_2eproto::scc_info_FetchAgentConfigResponse.base); return *internal_default_instance(); } @@ -5816,8 +5816,8 @@ void FetchAgentConfigResponse::InternalSwap(FetchAgentConfigResponse* other) { } ::google::protobuf::Metadata FetchAgentConfigResponse::GetMetadata() const { - protobuf_agent_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_agent_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_v1_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v1_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; } diff --git a/core/config_server_pb/agent.pb.h b/core/config_server_pb/v1/agent.pb.h similarity index 99% rename from core/config_server_pb/agent.pb.h rename to core/config_server_pb/v1/agent.pb.h index f8b934c4ed..1ef68c9918 100644 --- a/core/config_server_pb/agent.pb.h +++ b/core/config_server_pb/v1/agent.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: agent.proto +// source: v1/agent.proto -#ifndef PROTOBUF_INCLUDED_agent_2eproto -#define PROTOBUF_INCLUDED_agent_2eproto +#ifndef PROTOBUF_INCLUDED_v1_2fagent_2eproto +#define PROTOBUF_INCLUDED_v1_2fagent_2eproto #include @@ -51,9 +51,9 @@ #include #include // @@protoc_insertion_point(includes) -#define PROTOBUF_INTERNAL_EXPORT_protobuf_agent_2eproto +#define PROTOBUF_INTERNAL_EXPORT_protobuf_v1_2fagent_2eproto -namespace protobuf_agent_2eproto { +namespace protobuf_v1_2fagent_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -64,7 +64,7 @@ struct TableStruct { static const ::google::protobuf::uint32 offsets[]; }; void AddDescriptors(); -} // namespace protobuf_agent_2eproto +} // namespace protobuf_v1_2fagent_2eproto namespace configserver { namespace proto { class AgentAttributes; @@ -331,7 +331,7 @@ class ConfigInfo : public ::google::protobuf::Message /* @@protoc_insertion_poin ::google::protobuf::int64 version_; int type_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -485,7 +485,7 @@ class ConfigCheckResult : public ::google::protobuf::Message /* @@protoc_inserti int check_status_; ::google::protobuf::int64 new_version_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -640,7 +640,7 @@ class ConfigDetail : public ::google::protobuf::Message /* @@protoc_insertion_po ::google::protobuf::int64 version_; int type_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -863,7 +863,7 @@ class AgentAttributes : public ::google::protobuf::Message /* @@protoc_insertion ::google::protobuf::internal::ArenaStringPtr region_; ::google::protobuf::internal::ArenaStringPtr zone_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1041,7 +1041,7 @@ class Command : public ::google::protobuf::Message /* @@protoc_insertion_point(c ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1273,7 +1273,7 @@ class HeartBeatRequest : public ::google::protobuf::Message /* @@protoc_insertio ::google::protobuf::int64 startup_time_; ::google::protobuf::int32 interval_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1445,7 +1445,7 @@ class HeartBeatResponse : public ::google::protobuf::Message /* @@protoc_inserti ::google::protobuf::internal::ArenaStringPtr message_; int code_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1584,7 +1584,7 @@ class FetchPipelineConfigRequest : public ::google::protobuf::Message /* @@proto ::google::protobuf::internal::ArenaStringPtr request_id_; ::google::protobuf::internal::ArenaStringPtr agent_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1730,7 +1730,7 @@ class FetchPipelineConfigResponse : public ::google::protobuf::Message /* @@prot ::google::protobuf::internal::ArenaStringPtr message_; int code_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -1882,7 +1882,7 @@ class FetchAgentConfigRequest : public ::google::protobuf::Message /* @@protoc_i ::google::protobuf::internal::ArenaStringPtr agent_id_; ::configserver::proto::AgentAttributes* attributes_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // ------------------------------------------------------------------- @@ -2028,7 +2028,7 @@ class FetchAgentConfigResponse : public ::google::protobuf::Message /* @@protoc_ ::google::protobuf::internal::ArenaStringPtr message_; int code_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - friend struct ::protobuf_agent_2eproto::TableStruct; + friend struct ::protobuf_v1_2fagent_2eproto::TableStruct; }; // =================================================================== @@ -4397,4 +4397,4 @@ inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::RespCode> // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_INCLUDED_agent_2eproto +#endif // PROTOBUF_INCLUDED_v1_2fagent_2eproto diff --git a/core/config_server_pb/v2/agent.pb.cc b/core/config_server_pb/v2/agent.pb.cc new file mode 100644 index 0000000000..6893c169c8 --- /dev/null +++ b/core/config_server_pb/v2/agent.pb.cc @@ -0,0 +1,5251 @@ +// Copyright 2024 iLogtail Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: v2/agent.proto + +#include "agent.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// This is a temporary google only hack +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS +#include "third_party/protobuf/version.h" +#endif +// @@protoc_insertion_point(includes) + +namespace protobuf_v2_2fagent_2eproto { +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AgentAttributes_ExtrasEntry_DoNotUse; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AgentGroupTag; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CommandDetail; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CommandInfo; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigDetail; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ConfigInfo; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ServerErrorResponse; +extern PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AgentAttributes; +} // namespace protobuf_v2_2fagent_2eproto +namespace configserver { +namespace proto { +namespace v2 { +class AgentGroupTagDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _AgentGroupTag_default_instance_; +class ConfigInfoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _ConfigInfo_default_instance_; +class CommandInfoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _CommandInfo_default_instance_; +class AgentAttributes_ExtrasEntry_DoNotUseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _AgentAttributes_ExtrasEntry_DoNotUse_default_instance_; +class AgentAttributesDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _AgentAttributes_default_instance_; +class HeartbeatRequestDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _HeartbeatRequest_default_instance_; +class ConfigDetailDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _ConfigDetail_default_instance_; +class CommandDetailDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _CommandDetail_default_instance_; +class ServerErrorResponseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _ServerErrorResponse_default_instance_; +class HeartbeatResponseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _HeartbeatResponse_default_instance_; +class FetchConfigRequestDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _FetchConfigRequest_default_instance_; +class FetchConfigResponseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _FetchConfigResponse_default_instance_; +} // namespace v2 +} // namespace proto +} // namespace configserver +namespace protobuf_v2_2fagent_2eproto { +static void InitDefaultsAgentGroupTag() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_AgentGroupTag_default_instance_; + new (ptr) ::configserver::proto::v2::AgentGroupTag(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::AgentGroupTag::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_AgentGroupTag = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAgentGroupTag}, {}}; + +static void InitDefaultsConfigInfo() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_ConfigInfo_default_instance_; + new (ptr) ::configserver::proto::v2::ConfigInfo(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::ConfigInfo::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_ConfigInfo = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsConfigInfo}, {}}; + +static void InitDefaultsCommandInfo() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_CommandInfo_default_instance_; + new (ptr) ::configserver::proto::v2::CommandInfo(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::CommandInfo::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_CommandInfo = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCommandInfo}, {}}; + +static void InitDefaultsAgentAttributes_ExtrasEntry_DoNotUse() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_AgentAttributes_ExtrasEntry_DoNotUse_default_instance_; + new (ptr) ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse(); + } + ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_AgentAttributes_ExtrasEntry_DoNotUse = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAgentAttributes_ExtrasEntry_DoNotUse}, {}}; + +static void InitDefaultsAgentAttributes() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_AgentAttributes_default_instance_; + new (ptr) ::configserver::proto::v2::AgentAttributes(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::AgentAttributes::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_AgentAttributes = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAgentAttributes}, { + &protobuf_v2_2fagent_2eproto::scc_info_AgentAttributes_ExtrasEntry_DoNotUse.base,}}; + +static void InitDefaultsHeartbeatRequest() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_HeartbeatRequest_default_instance_; + new (ptr) ::configserver::proto::v2::HeartbeatRequest(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::HeartbeatRequest::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<4> scc_info_HeartbeatRequest = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsHeartbeatRequest}, { + &protobuf_v2_2fagent_2eproto::scc_info_AgentAttributes.base, + &protobuf_v2_2fagent_2eproto::scc_info_AgentGroupTag.base, + &protobuf_v2_2fagent_2eproto::scc_info_ConfigInfo.base, + &protobuf_v2_2fagent_2eproto::scc_info_CommandInfo.base,}}; + +static void InitDefaultsConfigDetail() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_ConfigDetail_default_instance_; + new (ptr) ::configserver::proto::v2::ConfigDetail(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::ConfigDetail::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_ConfigDetail = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsConfigDetail}, {}}; + +static void InitDefaultsCommandDetail() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_CommandDetail_default_instance_; + new (ptr) ::configserver::proto::v2::CommandDetail(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::CommandDetail::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_CommandDetail = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCommandDetail}, {}}; + +static void InitDefaultsServerErrorResponse() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_ServerErrorResponse_default_instance_; + new (ptr) ::configserver::proto::v2::ServerErrorResponse(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::ServerErrorResponse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_ServerErrorResponse = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsServerErrorResponse}, {}}; + +static void InitDefaultsHeartbeatResponse() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_HeartbeatResponse_default_instance_; + new (ptr) ::configserver::proto::v2::HeartbeatResponse(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::HeartbeatResponse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<3> scc_info_HeartbeatResponse = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsHeartbeatResponse}, { + &protobuf_v2_2fagent_2eproto::scc_info_ServerErrorResponse.base, + &protobuf_v2_2fagent_2eproto::scc_info_ConfigDetail.base, + &protobuf_v2_2fagent_2eproto::scc_info_CommandDetail.base,}}; + +static void InitDefaultsFetchConfigRequest() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_FetchConfigRequest_default_instance_; + new (ptr) ::configserver::proto::v2::FetchConfigRequest(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::FetchConfigRequest::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_FetchConfigRequest = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFetchConfigRequest}, { + &protobuf_v2_2fagent_2eproto::scc_info_ConfigInfo.base,}}; + +static void InitDefaultsFetchConfigResponse() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::configserver::proto::v2::_FetchConfigResponse_default_instance_; + new (ptr) ::configserver::proto::v2::FetchConfigResponse(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::configserver::proto::v2::FetchConfigResponse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<2> scc_info_FetchConfigResponse = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsFetchConfigResponse}, { + &protobuf_v2_2fagent_2eproto::scc_info_ServerErrorResponse.base, + &protobuf_v2_2fagent_2eproto::scc_info_ConfigDetail.base,}}; + +void InitDefaults() { + ::google::protobuf::internal::InitSCC(&scc_info_AgentGroupTag.base); + ::google::protobuf::internal::InitSCC(&scc_info_ConfigInfo.base); + ::google::protobuf::internal::InitSCC(&scc_info_CommandInfo.base); + ::google::protobuf::internal::InitSCC(&scc_info_AgentAttributes_ExtrasEntry_DoNotUse.base); + ::google::protobuf::internal::InitSCC(&scc_info_AgentAttributes.base); + ::google::protobuf::internal::InitSCC(&scc_info_HeartbeatRequest.base); + ::google::protobuf::internal::InitSCC(&scc_info_ConfigDetail.base); + ::google::protobuf::internal::InitSCC(&scc_info_CommandDetail.base); + ::google::protobuf::internal::InitSCC(&scc_info_ServerErrorResponse.base); + ::google::protobuf::internal::InitSCC(&scc_info_HeartbeatResponse.base); + ::google::protobuf::internal::InitSCC(&scc_info_FetchConfigRequest.base); + ::google::protobuf::internal::InitSCC(&scc_info_FetchConfigResponse.base); +} + +::google::protobuf::Metadata file_level_metadata[12]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[5]; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentGroupTag, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentGroupTag, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentGroupTag, value_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigInfo, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigInfo, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigInfo, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigInfo, message_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandInfo, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandInfo, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandInfo, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandInfo, message_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes, ip_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes, hostname_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::AgentAttributes, extras_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, request_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, sequence_num_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, capabilities_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, instance_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, agent_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, attributes_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, tags_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, running_status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, startup_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, pipeline_configs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, process_configs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, custom_commands_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, flags_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatRequest, opaque_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigDetail, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigDetail, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigDetail, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ConfigDetail, detail_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandDetail, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandDetail, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandDetail, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandDetail, detail_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::CommandDetail, expire_time_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ServerErrorResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ServerErrorResponse, error_code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::ServerErrorResponse, error_message_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, request_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, error_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, capabilities_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, pipeline_config_updates_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, process_config_updates_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, custom_command_updates_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, flags_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::HeartbeatResponse, opaque_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigRequest, request_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigRequest, instance_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigRequest, req_configs_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigResponse, request_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigResponse, error_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::configserver::proto::v2::FetchConfigResponse, config_details_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::configserver::proto::v2::AgentGroupTag)}, + { 7, -1, sizeof(::configserver::proto::v2::ConfigInfo)}, + { 16, -1, sizeof(::configserver::proto::v2::CommandInfo)}, + { 25, 32, sizeof(::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse)}, + { 34, -1, sizeof(::configserver::proto::v2::AgentAttributes)}, + { 43, -1, sizeof(::configserver::proto::v2::HeartbeatRequest)}, + { 62, -1, sizeof(::configserver::proto::v2::ConfigDetail)}, + { 70, -1, sizeof(::configserver::proto::v2::CommandDetail)}, + { 79, -1, sizeof(::configserver::proto::v2::ServerErrorResponse)}, + { 86, -1, sizeof(::configserver::proto::v2::HeartbeatResponse)}, + { 99, -1, sizeof(::configserver::proto::v2::FetchConfigRequest)}, + { 107, -1, sizeof(::configserver::proto::v2::FetchConfigResponse)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::configserver::proto::v2::_AgentGroupTag_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_ConfigInfo_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_CommandInfo_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_AgentAttributes_ExtrasEntry_DoNotUse_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_AgentAttributes_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_HeartbeatRequest_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_ConfigDetail_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_CommandDetail_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_ServerErrorResponse_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_HeartbeatResponse_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_FetchConfigRequest_default_instance_), + reinterpret_cast(&::configserver::proto::v2::_FetchConfigResponse_default_instance_), +}; + +void protobuf_AssignDescriptors() { + AddDescriptors(); + AssignDescriptors( + "v2/agent.proto", schemas, file_default_instances, TableStruct::offsets, + file_level_metadata, file_level_enum_descriptors, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 12); +} + +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\016v2/agent.proto\022\025configserver.proto.v2\"" + ",\n\rAgentGroupTag\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030" + "\002 \001(\t\"q\n\nConfigInfo\022\014\n\004name\030\001 \001(\t\022\017\n\007ver" + "sion\030\002 \001(\003\0223\n\006status\030\003 \001(\0162#.configserve" + "r.proto.v2.ConfigStatus\022\017\n\007message\030\004 \001(\t" + "\"o\n\013CommandInfo\022\014\n\004type\030\001 \001(\t\022\014\n\004name\030\002 " + "\001(\t\0223\n\006status\030\003 \001(\0162#.configserver.proto" + ".v2.ConfigStatus\022\017\n\007message\030\004 \001(\t\"\263\001\n\017Ag" + "entAttributes\022\017\n\007version\030\001 \001(\014\022\n\n\002ip\030\002 \001" + "(\014\022\020\n\010hostname\030\003 \001(\014\022B\n\006extras\030d \003(\01322.c" + "onfigserver.proto.v2.AgentAttributes.Ext" + "rasEntry\032-\n\013ExtrasEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + "value\030\002 \001(\014:\0028\001\"\356\003\n\020HeartbeatRequest\022\022\n\n" + "request_id\030\001 \001(\014\022\024\n\014sequence_num\030\002 \001(\004\022\024" + "\n\014capabilities\030\003 \001(\004\022\023\n\013instance_id\030\004 \001(" + "\014\022\022\n\nagent_type\030\005 \001(\t\022:\n\nattributes\030\006 \001(" + "\0132&.configserver.proto.v2.AgentAttribute" + "s\0222\n\004tags\030\007 \003(\0132$.configserver.proto.v2." + "AgentGroupTag\022\026\n\016running_status\030\010 \001(\t\022\024\n" + "\014startup_time\030\t \001(\003\022;\n\020pipeline_configs\030" + "\n \003(\0132!.configserver.proto.v2.ConfigInfo" + "\022:\n\017process_configs\030\013 \003(\0132!.configserver" + ".proto.v2.ConfigInfo\022;\n\017custom_commands\030" + "\014 \003(\0132\".configserver.proto.v2.CommandInf" + "o\022\r\n\005flags\030\r \001(\004\022\016\n\006opaque\030\016 \001(\014\"=\n\014Conf" + "igDetail\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\003\022" + "\016\n\006detail\030\003 \001(\014\"P\n\rCommandDetail\022\014\n\004type" + "\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\016\n\006detail\030\003 \001(\014\022\023\n\013" + "expire_time\030\004 \001(\003\"@\n\023ServerErrorResponse" + "\022\022\n\nerror_code\030\001 \001(\005\022\025\n\rerror_message\030\002 " + "\001(\t\"\361\002\n\021HeartbeatResponse\022\022\n\nrequest_id\030" + "\001 \001(\014\022B\n\016error_response\030\002 \001(\0132*.configse" + "rver.proto.v2.ServerErrorResponse\022\024\n\014cap" + "abilities\030\003 \001(\004\022D\n\027pipeline_config_updat" + "es\030\004 \003(\0132#.configserver.proto.v2.ConfigD" + "etail\022C\n\026process_config_updates\030\005 \003(\0132#." + "configserver.proto.v2.ConfigDetail\022D\n\026cu" + "stom_command_updates\030\006 \003(\0132$.configserve" + "r.proto.v2.CommandDetail\022\r\n\005flags\030\007 \001(\004\022" + "\016\n\006opaque\030\010 \001(\014\"u\n\022FetchConfigRequest\022\022\n" + "\nrequest_id\030\001 \001(\014\022\023\n\013instance_id\030\002 \001(\014\0226" + "\n\013req_configs\030\003 \003(\0132!.configserver.proto" + ".v2.ConfigInfo\"\252\001\n\023FetchConfigResponse\022\022" + "\n\nrequest_id\030\001 \001(\014\022B\n\016error_response\030\002 \001" + "(\0132*.configserver.proto.v2.ServerErrorRe" + "sponse\022;\n\016config_details\030\003 \003(\0132#.configs" + "erver.proto.v2.ConfigDetail*@\n\014ConfigSta" + "tus\022\t\n\005UNSET\020\000\022\014\n\010APPLYING\020\001\022\013\n\007APPLIED\020" + "\002\022\n\n\006FAILED\020\003*\202\001\n\021AgentCapabilities\022\036\n\032U" + "nspecifiedAgentCapability\020\000\022\031\n\025AcceptsPi" + "pelineConfig\020\001\022\030\n\024AcceptsProcessConfig\020\002" + "\022\030\n\024AcceptsCustomCommand\020\004*:\n\014RequestFla" + "gs\022\033\n\027RequestFlagsUnspecified\020\000\022\r\n\tFullS" + "tate\020\001*\254\001\n\022ServerCapabilities\022\037\n\033Unspeci" + "fiedServerCapability\020\000\022\024\n\020RembersAttribu" + "te\020\001\022\037\n\033RembersPipelineConfigStatus\020\002\022\036\n" + "\032RembersProcessConfigStatus\020\004\022\036\n\032Rembers" + "CustomCommandStatus\020\010*\177\n\rResponseFlags\022\034" + "\n\030ResponseFlagsUnspecified\020\000\022\023\n\017ReportFu" + "llState\020\001\022\035\n\031FetchPipelineConfigDetail\020\002" + "\022\034\n\030FetchProcessConfigDetail\020\004B6Z4/confi" + "g_server/service/protov2;configserver_pr" + "oto_v2b\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 2494); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "v2/agent.proto", &protobuf_RegisterTypes); +} + +void AddDescriptors() { + static ::google::protobuf::internal::once_flag once; + ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; +} // namespace protobuf_v2_2fagent_2eproto +namespace configserver { +namespace proto { +namespace v2 { +const ::google::protobuf::EnumDescriptor* ConfigStatus_descriptor() { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v2_2fagent_2eproto::file_level_enum_descriptors[0]; +} +bool ConfigStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* AgentCapabilities_descriptor() { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v2_2fagent_2eproto::file_level_enum_descriptors[1]; +} +bool AgentCapabilities_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 4: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* RequestFlags_descriptor() { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v2_2fagent_2eproto::file_level_enum_descriptors[2]; +} +bool RequestFlags_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* ServerCapabilities_descriptor() { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v2_2fagent_2eproto::file_level_enum_descriptors[3]; +} +bool ServerCapabilities_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 4: + case 8: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* ResponseFlags_descriptor() { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_v2_2fagent_2eproto::file_level_enum_descriptors[4]; +} +bool ResponseFlags_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 4: + return true; + default: + return false; + } +} + + +// =================================================================== + +void AgentGroupTag::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AgentGroupTag::kNameFieldNumber; +const int AgentGroupTag::kValueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AgentGroupTag::AgentGroupTag() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_AgentGroupTag.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.AgentGroupTag) +} +AgentGroupTag::AgentGroupTag(const AgentGroupTag& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.value().size() > 0) { + value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + } + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.AgentGroupTag) +} + +void AgentGroupTag::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +AgentGroupTag::~AgentGroupTag() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.AgentGroupTag) + SharedDtor(); +} + +void AgentGroupTag::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void AgentGroupTag::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* AgentGroupTag::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const AgentGroupTag& AgentGroupTag::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_AgentGroupTag.base); + return *internal_default_instance(); +} + + +void AgentGroupTag::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.AgentGroupTag) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +bool AgentGroupTag::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.AgentGroupTag) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.AgentGroupTag.name")); + } else { + goto handle_unusual; + } + break; + } + + // string value = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_value())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.AgentGroupTag.value")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.AgentGroupTag) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.AgentGroupTag) + return false; +#undef DO_ +} + +void AgentGroupTag::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.AgentGroupTag) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentGroupTag.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // string value = 2; + if (this->value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentGroupTag.value"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->value(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.AgentGroupTag) +} + +::google::protobuf::uint8* AgentGroupTag::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.AgentGroupTag) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentGroupTag.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // string value = 2; + if (this->value().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentGroupTag.value"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->value(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.AgentGroupTag) + return target; +} + +size_t AgentGroupTag::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.AgentGroupTag) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // string value = 2; + if (this->value().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->value()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AgentGroupTag::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.AgentGroupTag) + GOOGLE_DCHECK_NE(&from, this); + const AgentGroupTag* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.AgentGroupTag) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.AgentGroupTag) + MergeFrom(*source); + } +} + +void AgentGroupTag::MergeFrom(const AgentGroupTag& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.AgentGroupTag) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.value().size() > 0) { + + value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + } +} + +void AgentGroupTag::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.AgentGroupTag) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AgentGroupTag::CopyFrom(const AgentGroupTag& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.AgentGroupTag) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AgentGroupTag::IsInitialized() const { + return true; +} + +void AgentGroupTag::Swap(AgentGroupTag* other) { + if (other == this) return; + InternalSwap(other); +} +void AgentGroupTag::InternalSwap(AgentGroupTag* other) { + using std::swap; + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata AgentGroupTag::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void ConfigInfo::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ConfigInfo::kNameFieldNumber; +const int ConfigInfo::kVersionFieldNumber; +const int ConfigInfo::kStatusFieldNumber; +const int ConfigInfo::kMessageFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ConfigInfo::ConfigInfo() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_ConfigInfo.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.ConfigInfo) +} +ConfigInfo::ConfigInfo(const ConfigInfo& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.message().size() > 0) { + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } + ::memcpy(&version_, &from.version_, + static_cast(reinterpret_cast(&status_) - + reinterpret_cast(&version_)) + sizeof(status_)); + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.ConfigInfo) +} + +void ConfigInfo::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&version_, 0, static_cast( + reinterpret_cast(&status_) - + reinterpret_cast(&version_)) + sizeof(status_)); +} + +ConfigInfo::~ConfigInfo() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.ConfigInfo) + SharedDtor(); +} + +void ConfigInfo::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void ConfigInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* ConfigInfo::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ConfigInfo& ConfigInfo::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_ConfigInfo.base); + return *internal_default_instance(); +} + + +void ConfigInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.ConfigInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&version_, 0, static_cast( + reinterpret_cast(&status_) - + reinterpret_cast(&version_)) + sizeof(status_)); + _internal_metadata_.Clear(); +} + +bool ConfigInfo::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.ConfigInfo) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.ConfigInfo.name")); + } else { + goto handle_unusual; + } + break; + } + + // int64 version = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &version_))); + } else { + goto handle_unusual; + } + break; + } + + // .configserver.proto.v2.ConfigStatus status = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_status(static_cast< ::configserver::proto::v2::ConfigStatus >(value)); + } else { + goto handle_unusual; + } + break; + } + + // string message = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.ConfigInfo.message")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.ConfigInfo) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.ConfigInfo) + return false; +#undef DO_ +} + +void ConfigInfo::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.ConfigInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigInfo.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // int64 version = 2; + if (this->version() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->status(), output); + } + + // string message = 4; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigInfo.message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->message(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.ConfigInfo) +} + +::google::protobuf::uint8* ConfigInfo::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.ConfigInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigInfo.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // int64 version = 2; + if (this->version() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->status(), target); + } + + // string message = 4; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigInfo.message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->message(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.ConfigInfo) + return target; +} + +size_t ConfigInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.ConfigInfo) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // string message = 4; + if (this->message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->message()); + } + + // int64 version = 2; + if (this->version() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->version()); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConfigInfo::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.ConfigInfo) + GOOGLE_DCHECK_NE(&from, this); + const ConfigInfo* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.ConfigInfo) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.ConfigInfo) + MergeFrom(*source); + } +} + +void ConfigInfo::MergeFrom(const ConfigInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.ConfigInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.message().size() > 0) { + + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } + if (from.version() != 0) { + set_version(from.version()); + } + if (from.status() != 0) { + set_status(from.status()); + } +} + +void ConfigInfo::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.ConfigInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ConfigInfo::CopyFrom(const ConfigInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.ConfigInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConfigInfo::IsInitialized() const { + return true; +} + +void ConfigInfo::Swap(ConfigInfo* other) { + if (other == this) return; + InternalSwap(other); +} +void ConfigInfo::InternalSwap(ConfigInfo* other) { + using std::swap; + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(version_, other->version_); + swap(status_, other->status_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata ConfigInfo::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void CommandInfo::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int CommandInfo::kTypeFieldNumber; +const int CommandInfo::kNameFieldNumber; +const int CommandInfo::kStatusFieldNumber; +const int CommandInfo::kMessageFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +CommandInfo::CommandInfo() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_CommandInfo.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.CommandInfo) +} +CommandInfo::CommandInfo(const CommandInfo& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.type().size() > 0) { + type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_); + } + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.message().size() > 0) { + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } + status_ = from.status_; + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.CommandInfo) +} + +void CommandInfo::SharedCtor() { + type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + status_ = 0; +} + +CommandInfo::~CommandInfo() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.CommandInfo) + SharedDtor(); +} + +void CommandInfo::SharedDtor() { + type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void CommandInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* CommandInfo::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const CommandInfo& CommandInfo::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_CommandInfo.base); + return *internal_default_instance(); +} + + +void CommandInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.CommandInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + status_ = 0; + _internal_metadata_.Clear(); +} + +bool CommandInfo::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.CommandInfo) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string type = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.CommandInfo.type")); + } else { + goto handle_unusual; + } + break; + } + + // string name = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.CommandInfo.name")); + } else { + goto handle_unusual; + } + break; + } + + // .configserver.proto.v2.ConfigStatus status = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_status(static_cast< ::configserver::proto::v2::ConfigStatus >(value)); + } else { + goto handle_unusual; + } + break; + } + + // string message = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.CommandInfo.message")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.CommandInfo) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.CommandInfo) + return false; +#undef DO_ +} + +void CommandInfo::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.CommandInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->type(), output); + } + + // string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->status(), output); + } + + // string message = 4; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->message(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.CommandInfo) +} + +::google::protobuf::uint8* CommandInfo::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.CommandInfo) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->type(), target); + } + + // string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->status(), target); + } + + // string message = 4; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandInfo.message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->message(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.CommandInfo) + return target; +} + +size_t CommandInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.CommandInfo) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string type = 1; + if (this->type().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type()); + } + + // string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // string message = 4; + if (this->message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->message()); + } + + // .configserver.proto.v2.ConfigStatus status = 3; + if (this->status() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void CommandInfo::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.CommandInfo) + GOOGLE_DCHECK_NE(&from, this); + const CommandInfo* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.CommandInfo) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.CommandInfo) + MergeFrom(*source); + } +} + +void CommandInfo::MergeFrom(const CommandInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.CommandInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.type().size() > 0) { + + type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_); + } + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.message().size() > 0) { + + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } + if (from.status() != 0) { + set_status(from.status()); + } +} + +void CommandInfo::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.CommandInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CommandInfo::CopyFrom(const CommandInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.CommandInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CommandInfo::IsInitialized() const { + return true; +} + +void CommandInfo::Swap(CommandInfo* other) { + if (other == this) return; + InternalSwap(other); +} +void CommandInfo::InternalSwap(CommandInfo* other) { + using std::swap; + type_.Swap(&other->type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(status_, other->status_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata CommandInfo::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +AgentAttributes_ExtrasEntry_DoNotUse::AgentAttributes_ExtrasEntry_DoNotUse() {} +AgentAttributes_ExtrasEntry_DoNotUse::AgentAttributes_ExtrasEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} +void AgentAttributes_ExtrasEntry_DoNotUse::MergeFrom(const AgentAttributes_ExtrasEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::google::protobuf::Metadata AgentAttributes_ExtrasEntry_DoNotUse::GetMetadata() const { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[3]; +} +void AgentAttributes_ExtrasEntry_DoNotUse::MergeFrom( + const ::google::protobuf::Message& other) { + ::google::protobuf::Message::MergeFrom(other); +} + + +// =================================================================== + +void AgentAttributes::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AgentAttributes::kVersionFieldNumber; +const int AgentAttributes::kIpFieldNumber; +const int AgentAttributes::kHostnameFieldNumber; +const int AgentAttributes::kExtrasFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AgentAttributes::AgentAttributes() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_AgentAttributes.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.AgentAttributes) +} +AgentAttributes::AgentAttributes(const AgentAttributes& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + extras_.MergeFrom(from.extras_); + version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.version().size() > 0) { + version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); + } + ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.ip().size() > 0) { + ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_); + } + hostname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.hostname().size() > 0) { + hostname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hostname_); + } + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.AgentAttributes) +} + +void AgentAttributes::SharedCtor() { + version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + hostname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +AgentAttributes::~AgentAttributes() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.AgentAttributes) + SharedDtor(); +} + +void AgentAttributes::SharedDtor() { + version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + hostname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void AgentAttributes::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* AgentAttributes::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const AgentAttributes& AgentAttributes::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_AgentAttributes.base); + return *internal_default_instance(); +} + + +void AgentAttributes::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.AgentAttributes) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + extras_.Clear(); + version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ip_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + hostname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +bool AgentAttributes::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.AgentAttributes) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // bytes version = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_version())); + } else { + goto handle_unusual; + } + break; + } + + // bytes ip = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_ip())); + } else { + goto handle_unusual; + } + break; + } + + // bytes hostname = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_hostname())); + } else { + goto handle_unusual; + } + break; + } + + // map extras = 100; + case 100: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) { + AgentAttributes_ExtrasEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< + AgentAttributes_ExtrasEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_BYTES, + 0 >, + ::google::protobuf::Map< ::std::string, ::std::string > > parser(&extras_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.AgentAttributes.ExtrasEntry.key")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.AgentAttributes) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.AgentAttributes) + return false; +#undef DO_ +} + +void AgentAttributes::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.AgentAttributes) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes version = 1; + if (this->version().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->version(), output); + } + + // bytes ip = 2; + if (this->ip().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->ip(), output); + } + + // bytes hostname = 3; + if (this->hostname().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 3, this->hostname(), output); + } + + // map extras = 100; + if (!this->extras().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentAttributes.ExtrasEntry.key"); + } + }; + + if (output->IsSerializationDeterministic() && + this->extras().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->extras().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->extras().begin(); + it != this->extras().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(extras_.NewEntryWrapper( + items[static_cast(i)]->first, items[static_cast(i)]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 100, *entry, output); + Utf8Check::Check(items[static_cast(i)]); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->extras().begin(); + it != this->extras().end(); ++it) { + entry.reset(extras_.NewEntryWrapper( + it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 100, *entry, output); + Utf8Check::Check(&*it); + } + } + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.AgentAttributes) +} + +::google::protobuf::uint8* AgentAttributes::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.AgentAttributes) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes version = 1; + if (this->version().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->version(), target); + } + + // bytes ip = 2; + if (this->ip().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 2, this->ip(), target); + } + + // bytes hostname = 3; + if (this->hostname().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 3, this->hostname(), target); + } + + // map extras = 100; + if (!this->extras().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.AgentAttributes.ExtrasEntry.key"); + } + }; + + if (deterministic && + this->extras().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->extras().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->extras().begin(); + it != this->extras().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(extras_.NewEntryWrapper( + items[static_cast(i)]->first, items[static_cast(i)]->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 100, *entry, deterministic, target); +; + Utf8Check::Check(items[static_cast(i)]); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->extras().begin(); + it != this->extras().end(); ++it) { + entry.reset(extras_.NewEntryWrapper( + it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 100, *entry, deterministic, target); +; + Utf8Check::Check(&*it); + } + } + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.AgentAttributes) + return target; +} + +size_t AgentAttributes::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.AgentAttributes) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // map extras = 100; + total_size += 2 * + ::google::protobuf::internal::FromIntSize(this->extras_size()); + { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->extras().begin(); + it != this->extras().end(); ++it) { + entry.reset(extras_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + } + + // bytes version = 1; + if (this->version().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->version()); + } + + // bytes ip = 2; + if (this->ip().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->ip()); + } + + // bytes hostname = 3; + if (this->hostname().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->hostname()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AgentAttributes::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.AgentAttributes) + GOOGLE_DCHECK_NE(&from, this); + const AgentAttributes* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.AgentAttributes) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.AgentAttributes) + MergeFrom(*source); + } +} + +void AgentAttributes::MergeFrom(const AgentAttributes& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.AgentAttributes) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + extras_.MergeFrom(from.extras_); + if (from.version().size() > 0) { + + version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); + } + if (from.ip().size() > 0) { + + ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_); + } + if (from.hostname().size() > 0) { + + hostname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hostname_); + } +} + +void AgentAttributes::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.AgentAttributes) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AgentAttributes::CopyFrom(const AgentAttributes& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.AgentAttributes) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AgentAttributes::IsInitialized() const { + return true; +} + +void AgentAttributes::Swap(AgentAttributes* other) { + if (other == this) return; + InternalSwap(other); +} +void AgentAttributes::InternalSwap(AgentAttributes* other) { + using std::swap; + extras_.Swap(&other->extras_); + version_.Swap(&other->version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + ip_.Swap(&other->ip_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + hostname_.Swap(&other->hostname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata AgentAttributes::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void HeartbeatRequest::InitAsDefaultInstance() { + ::configserver::proto::v2::_HeartbeatRequest_default_instance_._instance.get_mutable()->attributes_ = const_cast< ::configserver::proto::v2::AgentAttributes*>( + ::configserver::proto::v2::AgentAttributes::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int HeartbeatRequest::kRequestIdFieldNumber; +const int HeartbeatRequest::kSequenceNumFieldNumber; +const int HeartbeatRequest::kCapabilitiesFieldNumber; +const int HeartbeatRequest::kInstanceIdFieldNumber; +const int HeartbeatRequest::kAgentTypeFieldNumber; +const int HeartbeatRequest::kAttributesFieldNumber; +const int HeartbeatRequest::kTagsFieldNumber; +const int HeartbeatRequest::kRunningStatusFieldNumber; +const int HeartbeatRequest::kStartupTimeFieldNumber; +const int HeartbeatRequest::kPipelineConfigsFieldNumber; +const int HeartbeatRequest::kProcessConfigsFieldNumber; +const int HeartbeatRequest::kCustomCommandsFieldNumber; +const int HeartbeatRequest::kFlagsFieldNumber; +const int HeartbeatRequest::kOpaqueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +HeartbeatRequest::HeartbeatRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_HeartbeatRequest.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.HeartbeatRequest) +} +HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + tags_(from.tags_), + pipeline_configs_(from.pipeline_configs_), + process_configs_(from.process_configs_), + custom_commands_(from.custom_commands_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.request_id().size() > 0) { + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.instance_id().size() > 0) { + instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + } + agent_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.agent_type().size() > 0) { + agent_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.agent_type_); + } + running_status_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.running_status().size() > 0) { + running_status_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.running_status_); + } + opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.opaque().size() > 0) { + opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_); + } + if (from.has_attributes()) { + attributes_ = new ::configserver::proto::v2::AgentAttributes(*from.attributes_); + } else { + attributes_ = NULL; + } + ::memcpy(&sequence_num_, &from.sequence_num_, + static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&sequence_num_)) + sizeof(flags_)); + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.HeartbeatRequest) +} + +void HeartbeatRequest::SharedCtor() { + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + agent_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + running_status_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&attributes_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&attributes_)) + sizeof(flags_)); +} + +HeartbeatRequest::~HeartbeatRequest() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.HeartbeatRequest) + SharedDtor(); +} + +void HeartbeatRequest::SharedDtor() { + request_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + agent_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + running_status_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete attributes_; +} + +void HeartbeatRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* HeartbeatRequest::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const HeartbeatRequest& HeartbeatRequest::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_HeartbeatRequest.base); + return *internal_default_instance(); +} + + +void HeartbeatRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.HeartbeatRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + tags_.Clear(); + pipeline_configs_.Clear(); + process_configs_.Clear(); + custom_commands_.Clear(); + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + agent_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + running_status_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && attributes_ != NULL) { + delete attributes_; + } + attributes_ = NULL; + ::memset(&sequence_num_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&sequence_num_)) + sizeof(flags_)); + _internal_metadata_.Clear(); +} + +bool HeartbeatRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.HeartbeatRequest) + 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)) { + // bytes request_id = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_request_id())); + } else { + goto handle_unusual; + } + break; + } + + // uint64 sequence_num = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &sequence_num_))); + } else { + goto handle_unusual; + } + break; + } + + // uint64 capabilities = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &capabilities_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes instance_id = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_instance_id())); + } else { + goto handle_unusual; + } + break; + } + + // string agent_type = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_agent_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->agent_type().data(), static_cast(this->agent_type().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.HeartbeatRequest.agent_type")); + } else { + goto handle_unusual; + } + break; + } + + // .configserver.proto.v2.AgentAttributes attributes = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_attributes())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.AgentGroupTag tags = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_tags())); + } else { + goto handle_unusual; + } + break; + } + + // string running_status = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_running_status())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->running_status().data(), static_cast(this->running_status().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.HeartbeatRequest.running_status")); + } else { + goto handle_unusual; + } + break; + } + + // int64 startup_time = 9; + case 9: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &startup_time_))); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; + case 10: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_pipeline_configs())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigInfo process_configs = 11; + case 11: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_process_configs())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.CommandInfo custom_commands = 12; + case 12: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_custom_commands())); + } else { + goto handle_unusual; + } + break; + } + + // uint64 flags = 13; + case 13: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &flags_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes opaque = 14; + case 14: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_opaque())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.HeartbeatRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.HeartbeatRequest) + return false; +#undef DO_ +} + +void HeartbeatRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.HeartbeatRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->request_id(), output); + } + + // uint64 sequence_num = 2; + if (this->sequence_num() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->sequence_num(), output); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->capabilities(), output); + } + + // bytes instance_id = 4; + if (this->instance_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->instance_id(), output); + } + + // string agent_type = 5; + if (this->agent_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->agent_type().data(), static_cast(this->agent_type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.HeartbeatRequest.agent_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->agent_type(), output); + } + + // .configserver.proto.v2.AgentAttributes attributes = 6; + if (this->has_attributes()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, this->_internal_attributes(), output); + } + + // repeated .configserver.proto.v2.AgentGroupTag tags = 7; + for (unsigned int i = 0, + n = static_cast(this->tags_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, + this->tags(static_cast(i)), + output); + } + + // string running_status = 8; + if (this->running_status().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->running_status().data(), static_cast(this->running_status().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.HeartbeatRequest.running_status"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 8, this->running_status(), output); + } + + // int64 startup_time = 9; + if (this->startup_time() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(9, this->startup_time(), output); + } + + // repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; + for (unsigned int i = 0, + n = static_cast(this->pipeline_configs_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 10, + this->pipeline_configs(static_cast(i)), + output); + } + + // repeated .configserver.proto.v2.ConfigInfo process_configs = 11; + for (unsigned int i = 0, + n = static_cast(this->process_configs_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 11, + this->process_configs(static_cast(i)), + output); + } + + // repeated .configserver.proto.v2.CommandInfo custom_commands = 12; + for (unsigned int i = 0, + n = static_cast(this->custom_commands_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 12, + this->custom_commands(static_cast(i)), + output); + } + + // uint64 flags = 13; + if (this->flags() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(13, this->flags(), output); + } + + // bytes opaque = 14; + if (this->opaque().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 14, this->opaque(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.HeartbeatRequest) +} + +::google::protobuf::uint8* HeartbeatRequest::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.HeartbeatRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->request_id(), target); + } + + // uint64 sequence_num = 2; + if (this->sequence_num() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->sequence_num(), target); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->capabilities(), target); + } + + // bytes instance_id = 4; + if (this->instance_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 4, this->instance_id(), target); + } + + // string agent_type = 5; + if (this->agent_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->agent_type().data(), static_cast(this->agent_type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.HeartbeatRequest.agent_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->agent_type(), target); + } + + // .configserver.proto.v2.AgentAttributes attributes = 6; + if (this->has_attributes()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 6, this->_internal_attributes(), deterministic, target); + } + + // repeated .configserver.proto.v2.AgentGroupTag tags = 7; + for (unsigned int i = 0, + n = static_cast(this->tags_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 7, this->tags(static_cast(i)), deterministic, target); + } + + // string running_status = 8; + if (this->running_status().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->running_status().data(), static_cast(this->running_status().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.HeartbeatRequest.running_status"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 8, this->running_status(), target); + } + + // int64 startup_time = 9; + if (this->startup_time() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(9, this->startup_time(), target); + } + + // repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; + for (unsigned int i = 0, + n = static_cast(this->pipeline_configs_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 10, this->pipeline_configs(static_cast(i)), deterministic, target); + } + + // repeated .configserver.proto.v2.ConfigInfo process_configs = 11; + for (unsigned int i = 0, + n = static_cast(this->process_configs_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 11, this->process_configs(static_cast(i)), deterministic, target); + } + + // repeated .configserver.proto.v2.CommandInfo custom_commands = 12; + for (unsigned int i = 0, + n = static_cast(this->custom_commands_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 12, this->custom_commands(static_cast(i)), deterministic, target); + } + + // uint64 flags = 13; + if (this->flags() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(13, this->flags(), target); + } + + // bytes opaque = 14; + if (this->opaque().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 14, this->opaque(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.HeartbeatRequest) + return target; +} + +size_t HeartbeatRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.HeartbeatRequest) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .configserver.proto.v2.AgentGroupTag tags = 7; + { + unsigned int count = static_cast(this->tags_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->tags(static_cast(i))); + } + } + + // repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; + { + unsigned int count = static_cast(this->pipeline_configs_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->pipeline_configs(static_cast(i))); + } + } + + // repeated .configserver.proto.v2.ConfigInfo process_configs = 11; + { + unsigned int count = static_cast(this->process_configs_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->process_configs(static_cast(i))); + } + } + + // repeated .configserver.proto.v2.CommandInfo custom_commands = 12; + { + unsigned int count = static_cast(this->custom_commands_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->custom_commands(static_cast(i))); + } + } + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->request_id()); + } + + // bytes instance_id = 4; + if (this->instance_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->instance_id()); + } + + // string agent_type = 5; + if (this->agent_type().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->agent_type()); + } + + // string running_status = 8; + if (this->running_status().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->running_status()); + } + + // bytes opaque = 14; + if (this->opaque().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->opaque()); + } + + // .configserver.proto.v2.AgentAttributes attributes = 6; + if (this->has_attributes()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *attributes_); + } + + // uint64 sequence_num = 2; + if (this->sequence_num() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->sequence_num()); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->capabilities()); + } + + // int64 startup_time = 9; + if (this->startup_time() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->startup_time()); + } + + // uint64 flags = 13; + if (this->flags() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->flags()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeartbeatRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.HeartbeatRequest) + GOOGLE_DCHECK_NE(&from, this); + const HeartbeatRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.HeartbeatRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.HeartbeatRequest) + MergeFrom(*source); + } +} + +void HeartbeatRequest::MergeFrom(const HeartbeatRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.HeartbeatRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + tags_.MergeFrom(from.tags_); + pipeline_configs_.MergeFrom(from.pipeline_configs_); + process_configs_.MergeFrom(from.process_configs_); + custom_commands_.MergeFrom(from.custom_commands_); + if (from.request_id().size() > 0) { + + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + if (from.instance_id().size() > 0) { + + instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + } + if (from.agent_type().size() > 0) { + + agent_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.agent_type_); + } + if (from.running_status().size() > 0) { + + running_status_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.running_status_); + } + if (from.opaque().size() > 0) { + + opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_); + } + if (from.has_attributes()) { + mutable_attributes()->::configserver::proto::v2::AgentAttributes::MergeFrom(from.attributes()); + } + if (from.sequence_num() != 0) { + set_sequence_num(from.sequence_num()); + } + if (from.capabilities() != 0) { + set_capabilities(from.capabilities()); + } + if (from.startup_time() != 0) { + set_startup_time(from.startup_time()); + } + if (from.flags() != 0) { + set_flags(from.flags()); + } +} + +void HeartbeatRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.HeartbeatRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HeartbeatRequest::CopyFrom(const HeartbeatRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.HeartbeatRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeartbeatRequest::IsInitialized() const { + return true; +} + +void HeartbeatRequest::Swap(HeartbeatRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void HeartbeatRequest::InternalSwap(HeartbeatRequest* other) { + using std::swap; + CastToBase(&tags_)->InternalSwap(CastToBase(&other->tags_)); + CastToBase(&pipeline_configs_)->InternalSwap(CastToBase(&other->pipeline_configs_)); + CastToBase(&process_configs_)->InternalSwap(CastToBase(&other->process_configs_)); + CastToBase(&custom_commands_)->InternalSwap(CastToBase(&other->custom_commands_)); + request_id_.Swap(&other->request_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + instance_id_.Swap(&other->instance_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + agent_type_.Swap(&other->agent_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + running_status_.Swap(&other->running_status_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + opaque_.Swap(&other->opaque_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(attributes_, other->attributes_); + swap(sequence_num_, other->sequence_num_); + swap(capabilities_, other->capabilities_); + swap(startup_time_, other->startup_time_); + swap(flags_, other->flags_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata HeartbeatRequest::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void ConfigDetail::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ConfigDetail::kNameFieldNumber; +const int ConfigDetail::kVersionFieldNumber; +const int ConfigDetail::kDetailFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ConfigDetail::ConfigDetail() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_ConfigDetail.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.ConfigDetail) +} +ConfigDetail::ConfigDetail(const ConfigDetail& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.detail().size() > 0) { + detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); + } + version_ = from.version_; + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.ConfigDetail) +} + +void ConfigDetail::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_ = GOOGLE_LONGLONG(0); +} + +ConfigDetail::~ConfigDetail() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.ConfigDetail) + SharedDtor(); +} + +void ConfigDetail::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void ConfigDetail::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* ConfigDetail::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ConfigDetail& ConfigDetail::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_ConfigDetail.base); + return *internal_default_instance(); +} + + +void ConfigDetail::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.ConfigDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_ = GOOGLE_LONGLONG(0); + _internal_metadata_.Clear(); +} + +bool ConfigDetail::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.ConfigDetail) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.ConfigDetail.name")); + } else { + goto handle_unusual; + } + break; + } + + // int64 version = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &version_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes detail = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_detail())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.ConfigDetail) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.ConfigDetail) + return false; +#undef DO_ +} + +void ConfigDetail::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.ConfigDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigDetail.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // int64 version = 2; + if (this->version() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 3, this->detail(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.ConfigDetail) +} + +::google::protobuf::uint8* ConfigDetail::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.ConfigDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ConfigDetail.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // int64 version = 2; + if (this->version() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 3, this->detail(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.ConfigDetail) + return target; +} + +size_t ConfigDetail::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.ConfigDetail) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->detail()); + } + + // int64 version = 2; + if (this->version() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->version()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConfigDetail::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.ConfigDetail) + GOOGLE_DCHECK_NE(&from, this); + const ConfigDetail* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.ConfigDetail) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.ConfigDetail) + MergeFrom(*source); + } +} + +void ConfigDetail::MergeFrom(const ConfigDetail& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.ConfigDetail) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.detail().size() > 0) { + + detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); + } + if (from.version() != 0) { + set_version(from.version()); + } +} + +void ConfigDetail::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.ConfigDetail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ConfigDetail::CopyFrom(const ConfigDetail& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.ConfigDetail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConfigDetail::IsInitialized() const { + return true; +} + +void ConfigDetail::Swap(ConfigDetail* other) { + if (other == this) return; + InternalSwap(other); +} +void ConfigDetail::InternalSwap(ConfigDetail* other) { + using std::swap; + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + detail_.Swap(&other->detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(version_, other->version_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata ConfigDetail::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void CommandDetail::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int CommandDetail::kTypeFieldNumber; +const int CommandDetail::kNameFieldNumber; +const int CommandDetail::kDetailFieldNumber; +const int CommandDetail::kExpireTimeFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +CommandDetail::CommandDetail() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_CommandDetail.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.CommandDetail) +} +CommandDetail::CommandDetail(const CommandDetail& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.type().size() > 0) { + type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_); + } + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.detail().size() > 0) { + detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); + } + expire_time_ = from.expire_time_; + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.CommandDetail) +} + +void CommandDetail::SharedCtor() { + type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + expire_time_ = GOOGLE_LONGLONG(0); +} + +CommandDetail::~CommandDetail() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.CommandDetail) + SharedDtor(); +} + +void CommandDetail::SharedDtor() { + type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void CommandDetail::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* CommandDetail::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const CommandDetail& CommandDetail::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_CommandDetail.base); + return *internal_default_instance(); +} + + +void CommandDetail::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.CommandDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + expire_time_ = GOOGLE_LONGLONG(0); + _internal_metadata_.Clear(); +} + +bool CommandDetail::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.CommandDetail) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string type = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.CommandDetail.type")); + } else { + goto handle_unusual; + } + break; + } + + // string name = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.CommandDetail.name")); + } else { + goto handle_unusual; + } + break; + } + + // bytes detail = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_detail())); + } else { + goto handle_unusual; + } + break; + } + + // int64 expire_time = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &expire_time_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.CommandDetail) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.CommandDetail) + return false; +#undef DO_ +} + +void CommandDetail::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.CommandDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandDetail.type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->type(), output); + } + + // string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandDetail.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 3, this->detail(), output); + } + + // int64 expire_time = 4; + if (this->expire_time() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->expire_time(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.CommandDetail) +} + +::google::protobuf::uint8* CommandDetail::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.CommandDetail) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), static_cast(this->type().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandDetail.type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->type(), target); + } + + // string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.CommandDetail.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 3, this->detail(), target); + } + + // int64 expire_time = 4; + if (this->expire_time() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->expire_time(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.CommandDetail) + return target; +} + +size_t CommandDetail::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.CommandDetail) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string type = 1; + if (this->type().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type()); + } + + // string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // bytes detail = 3; + if (this->detail().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->detail()); + } + + // int64 expire_time = 4; + if (this->expire_time() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->expire_time()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void CommandDetail::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.CommandDetail) + GOOGLE_DCHECK_NE(&from, this); + const CommandDetail* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.CommandDetail) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.CommandDetail) + MergeFrom(*source); + } +} + +void CommandDetail::MergeFrom(const CommandDetail& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.CommandDetail) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.type().size() > 0) { + + type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_); + } + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.detail().size() > 0) { + + detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); + } + if (from.expire_time() != 0) { + set_expire_time(from.expire_time()); + } +} + +void CommandDetail::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.CommandDetail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void CommandDetail::CopyFrom(const CommandDetail& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.CommandDetail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CommandDetail::IsInitialized() const { + return true; +} + +void CommandDetail::Swap(CommandDetail* other) { + if (other == this) return; + InternalSwap(other); +} +void CommandDetail::InternalSwap(CommandDetail* other) { + using std::swap; + type_.Swap(&other->type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + detail_.Swap(&other->detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(expire_time_, other->expire_time_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata CommandDetail::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void ServerErrorResponse::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ServerErrorResponse::kErrorCodeFieldNumber; +const int ServerErrorResponse::kErrorMessageFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ServerErrorResponse::ServerErrorResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_ServerErrorResponse.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.ServerErrorResponse) +} +ServerErrorResponse::ServerErrorResponse(const ServerErrorResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.error_message().size() > 0) { + error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + } + error_code_ = from.error_code_; + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.ServerErrorResponse) +} + +void ServerErrorResponse::SharedCtor() { + error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_code_ = 0; +} + +ServerErrorResponse::~ServerErrorResponse() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.ServerErrorResponse) + SharedDtor(); +} + +void ServerErrorResponse::SharedDtor() { + error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void ServerErrorResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* ServerErrorResponse::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ServerErrorResponse& ServerErrorResponse::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_ServerErrorResponse.base); + return *internal_default_instance(); +} + + +void ServerErrorResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.ServerErrorResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_code_ = 0; + _internal_metadata_.Clear(); +} + +bool ServerErrorResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.ServerErrorResponse) + 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)) { + // int32 error_code = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &error_code_))); + } else { + goto handle_unusual; + } + break; + } + + // string error_message = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_error_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), static_cast(this->error_message().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "configserver.proto.v2.ServerErrorResponse.error_message")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.ServerErrorResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.ServerErrorResponse) + return false; +#undef DO_ +} + +void ServerErrorResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.ServerErrorResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output); + } + + // string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), static_cast(this->error_message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ServerErrorResponse.error_message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->error_message(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.ServerErrorResponse) +} + +::google::protobuf::uint8* ServerErrorResponse::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.ServerErrorResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target); + } + + // string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), static_cast(this->error_message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "configserver.proto.v2.ServerErrorResponse.error_message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->error_message(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.ServerErrorResponse) + return target; +} + +size_t ServerErrorResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.ServerErrorResponse) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string error_message = 2; + if (this->error_message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->error_message()); + } + + // int32 error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->error_code()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ServerErrorResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.ServerErrorResponse) + GOOGLE_DCHECK_NE(&from, this); + const ServerErrorResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.ServerErrorResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.ServerErrorResponse) + MergeFrom(*source); + } +} + +void ServerErrorResponse::MergeFrom(const ServerErrorResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.ServerErrorResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.error_message().size() > 0) { + + error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + } + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } +} + +void ServerErrorResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.ServerErrorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerErrorResponse::CopyFrom(const ServerErrorResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.ServerErrorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerErrorResponse::IsInitialized() const { + return true; +} + +void ServerErrorResponse::Swap(ServerErrorResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ServerErrorResponse::InternalSwap(ServerErrorResponse* other) { + using std::swap; + error_message_.Swap(&other->error_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(error_code_, other->error_code_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata ServerErrorResponse::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void HeartbeatResponse::InitAsDefaultInstance() { + ::configserver::proto::v2::_HeartbeatResponse_default_instance_._instance.get_mutable()->error_response_ = const_cast< ::configserver::proto::v2::ServerErrorResponse*>( + ::configserver::proto::v2::ServerErrorResponse::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int HeartbeatResponse::kRequestIdFieldNumber; +const int HeartbeatResponse::kErrorResponseFieldNumber; +const int HeartbeatResponse::kCapabilitiesFieldNumber; +const int HeartbeatResponse::kPipelineConfigUpdatesFieldNumber; +const int HeartbeatResponse::kProcessConfigUpdatesFieldNumber; +const int HeartbeatResponse::kCustomCommandUpdatesFieldNumber; +const int HeartbeatResponse::kFlagsFieldNumber; +const int HeartbeatResponse::kOpaqueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +HeartbeatResponse::HeartbeatResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_HeartbeatResponse.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.HeartbeatResponse) +} +HeartbeatResponse::HeartbeatResponse(const HeartbeatResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + pipeline_config_updates_(from.pipeline_config_updates_), + process_config_updates_(from.process_config_updates_), + custom_command_updates_(from.custom_command_updates_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.request_id().size() > 0) { + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.opaque().size() > 0) { + opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_); + } + if (from.has_error_response()) { + error_response_ = new ::configserver::proto::v2::ServerErrorResponse(*from.error_response_); + } else { + error_response_ = NULL; + } + ::memcpy(&capabilities_, &from.capabilities_, + static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&capabilities_)) + sizeof(flags_)); + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.HeartbeatResponse) +} + +void HeartbeatResponse::SharedCtor() { + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&error_response_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&error_response_)) + sizeof(flags_)); +} + +HeartbeatResponse::~HeartbeatResponse() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.HeartbeatResponse) + SharedDtor(); +} + +void HeartbeatResponse::SharedDtor() { + request_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete error_response_; +} + +void HeartbeatResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* HeartbeatResponse::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const HeartbeatResponse& HeartbeatResponse::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_HeartbeatResponse.base); + return *internal_default_instance(); +} + + +void HeartbeatResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.HeartbeatResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + pipeline_config_updates_.Clear(); + process_config_updates_.Clear(); + custom_command_updates_.Clear(); + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opaque_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && error_response_ != NULL) { + delete error_response_; + } + error_response_ = NULL; + ::memset(&capabilities_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&capabilities_)) + sizeof(flags_)); + _internal_metadata_.Clear(); +} + +bool HeartbeatResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.HeartbeatResponse) + 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)) { + // bytes request_id = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_request_id())); + } else { + goto handle_unusual; + } + break; + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_error_response())); + } else { + goto handle_unusual; + } + break; + } + + // uint64 capabilities = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &capabilities_))); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_pipeline_config_updates())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_process_config_updates())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_custom_command_updates())); + } else { + goto handle_unusual; + } + break; + } + + // uint64 flags = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &flags_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes opaque = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_opaque())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.HeartbeatResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.HeartbeatResponse) + return false; +#undef DO_ +} + +void HeartbeatResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.HeartbeatResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->request_id(), output); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->_internal_error_response(), output); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->capabilities(), output); + } + + // repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; + for (unsigned int i = 0, + n = static_cast(this->pipeline_config_updates_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, + this->pipeline_config_updates(static_cast(i)), + output); + } + + // repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; + for (unsigned int i = 0, + n = static_cast(this->process_config_updates_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, + this->process_config_updates(static_cast(i)), + output); + } + + // repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; + for (unsigned int i = 0, + n = static_cast(this->custom_command_updates_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, + this->custom_command_updates(static_cast(i)), + output); + } + + // uint64 flags = 7; + if (this->flags() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(7, this->flags(), output); + } + + // bytes opaque = 8; + if (this->opaque().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 8, this->opaque(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.HeartbeatResponse) +} + +::google::protobuf::uint8* HeartbeatResponse::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.HeartbeatResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->request_id(), target); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->_internal_error_response(), deterministic, target); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->capabilities(), target); + } + + // repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; + for (unsigned int i = 0, + n = static_cast(this->pipeline_config_updates_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 4, this->pipeline_config_updates(static_cast(i)), deterministic, target); + } + + // repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; + for (unsigned int i = 0, + n = static_cast(this->process_config_updates_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, this->process_config_updates(static_cast(i)), deterministic, target); + } + + // repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; + for (unsigned int i = 0, + n = static_cast(this->custom_command_updates_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 6, this->custom_command_updates(static_cast(i)), deterministic, target); + } + + // uint64 flags = 7; + if (this->flags() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(7, this->flags(), target); + } + + // bytes opaque = 8; + if (this->opaque().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 8, this->opaque(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.HeartbeatResponse) + return target; +} + +size_t HeartbeatResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.HeartbeatResponse) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; + { + unsigned int count = static_cast(this->pipeline_config_updates_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->pipeline_config_updates(static_cast(i))); + } + } + + // repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; + { + unsigned int count = static_cast(this->process_config_updates_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->process_config_updates(static_cast(i))); + } + } + + // repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; + { + unsigned int count = static_cast(this->custom_command_updates_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->custom_command_updates(static_cast(i))); + } + } + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->request_id()); + } + + // bytes opaque = 8; + if (this->opaque().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->opaque()); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *error_response_); + } + + // uint64 capabilities = 3; + if (this->capabilities() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->capabilities()); + } + + // uint64 flags = 7; + if (this->flags() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->flags()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeartbeatResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.HeartbeatResponse) + GOOGLE_DCHECK_NE(&from, this); + const HeartbeatResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.HeartbeatResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.HeartbeatResponse) + MergeFrom(*source); + } +} + +void HeartbeatResponse::MergeFrom(const HeartbeatResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.HeartbeatResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + pipeline_config_updates_.MergeFrom(from.pipeline_config_updates_); + process_config_updates_.MergeFrom(from.process_config_updates_); + custom_command_updates_.MergeFrom(from.custom_command_updates_); + if (from.request_id().size() > 0) { + + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + if (from.opaque().size() > 0) { + + opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_); + } + if (from.has_error_response()) { + mutable_error_response()->::configserver::proto::v2::ServerErrorResponse::MergeFrom(from.error_response()); + } + if (from.capabilities() != 0) { + set_capabilities(from.capabilities()); + } + if (from.flags() != 0) { + set_flags(from.flags()); + } +} + +void HeartbeatResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.HeartbeatResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HeartbeatResponse::CopyFrom(const HeartbeatResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.HeartbeatResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeartbeatResponse::IsInitialized() const { + return true; +} + +void HeartbeatResponse::Swap(HeartbeatResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void HeartbeatResponse::InternalSwap(HeartbeatResponse* other) { + using std::swap; + CastToBase(&pipeline_config_updates_)->InternalSwap(CastToBase(&other->pipeline_config_updates_)); + CastToBase(&process_config_updates_)->InternalSwap(CastToBase(&other->process_config_updates_)); + CastToBase(&custom_command_updates_)->InternalSwap(CastToBase(&other->custom_command_updates_)); + request_id_.Swap(&other->request_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + opaque_.Swap(&other->opaque_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(error_response_, other->error_response_); + swap(capabilities_, other->capabilities_); + swap(flags_, other->flags_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata HeartbeatResponse::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void FetchConfigRequest::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FetchConfigRequest::kRequestIdFieldNumber; +const int FetchConfigRequest::kInstanceIdFieldNumber; +const int FetchConfigRequest::kReqConfigsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FetchConfigRequest::FetchConfigRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_FetchConfigRequest.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.FetchConfigRequest) +} +FetchConfigRequest::FetchConfigRequest(const FetchConfigRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + req_configs_(from.req_configs_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.request_id().size() > 0) { + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.instance_id().size() > 0) { + instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + } + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.FetchConfigRequest) +} + +void FetchConfigRequest::SharedCtor() { + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +FetchConfigRequest::~FetchConfigRequest() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.FetchConfigRequest) + SharedDtor(); +} + +void FetchConfigRequest::SharedDtor() { + request_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void FetchConfigRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* FetchConfigRequest::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const FetchConfigRequest& FetchConfigRequest::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_FetchConfigRequest.base); + return *internal_default_instance(); +} + + +void FetchConfigRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.FetchConfigRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + req_configs_.Clear(); + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +bool FetchConfigRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.FetchConfigRequest) + 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)) { + // bytes request_id = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_request_id())); + } else { + goto handle_unusual; + } + break; + } + + // bytes instance_id = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_instance_id())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigInfo req_configs = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_req_configs())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.FetchConfigRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.FetchConfigRequest) + return false; +#undef DO_ +} + +void FetchConfigRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.FetchConfigRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->request_id(), output); + } + + // bytes instance_id = 2; + if (this->instance_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->instance_id(), output); + } + + // repeated .configserver.proto.v2.ConfigInfo req_configs = 3; + for (unsigned int i = 0, + n = static_cast(this->req_configs_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->req_configs(static_cast(i)), + output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.FetchConfigRequest) +} + +::google::protobuf::uint8* FetchConfigRequest::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.FetchConfigRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->request_id(), target); + } + + // bytes instance_id = 2; + if (this->instance_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 2, this->instance_id(), target); + } + + // repeated .configserver.proto.v2.ConfigInfo req_configs = 3; + for (unsigned int i = 0, + n = static_cast(this->req_configs_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->req_configs(static_cast(i)), deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.FetchConfigRequest) + return target; +} + +size_t FetchConfigRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.FetchConfigRequest) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .configserver.proto.v2.ConfigInfo req_configs = 3; + { + unsigned int count = static_cast(this->req_configs_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->req_configs(static_cast(i))); + } + } + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->request_id()); + } + + // bytes instance_id = 2; + if (this->instance_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->instance_id()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchConfigRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.FetchConfigRequest) + GOOGLE_DCHECK_NE(&from, this); + const FetchConfigRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.FetchConfigRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.FetchConfigRequest) + MergeFrom(*source); + } +} + +void FetchConfigRequest::MergeFrom(const FetchConfigRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.FetchConfigRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + req_configs_.MergeFrom(from.req_configs_); + if (from.request_id().size() > 0) { + + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + if (from.instance_id().size() > 0) { + + instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + } +} + +void FetchConfigRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.FetchConfigRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FetchConfigRequest::CopyFrom(const FetchConfigRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.FetchConfigRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchConfigRequest::IsInitialized() const { + return true; +} + +void FetchConfigRequest::Swap(FetchConfigRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void FetchConfigRequest::InternalSwap(FetchConfigRequest* other) { + using std::swap; + CastToBase(&req_configs_)->InternalSwap(CastToBase(&other->req_configs_)); + request_id_.Swap(&other->request_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + instance_id_.Swap(&other->instance_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata FetchConfigRequest::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void FetchConfigResponse::InitAsDefaultInstance() { + ::configserver::proto::v2::_FetchConfigResponse_default_instance_._instance.get_mutable()->error_response_ = const_cast< ::configserver::proto::v2::ServerErrorResponse*>( + ::configserver::proto::v2::ServerErrorResponse::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FetchConfigResponse::kRequestIdFieldNumber; +const int FetchConfigResponse::kErrorResponseFieldNumber; +const int FetchConfigResponse::kConfigDetailsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FetchConfigResponse::FetchConfigResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + ::google::protobuf::internal::InitSCC( + &protobuf_v2_2fagent_2eproto::scc_info_FetchConfigResponse.base); + SharedCtor(); + // @@protoc_insertion_point(constructor:configserver.proto.v2.FetchConfigResponse) +} +FetchConfigResponse::FetchConfigResponse(const FetchConfigResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + config_details_(from.config_details_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.request_id().size() > 0) { + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + if (from.has_error_response()) { + error_response_ = new ::configserver::proto::v2::ServerErrorResponse(*from.error_response_); + } else { + error_response_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:configserver.proto.v2.FetchConfigResponse) +} + +void FetchConfigResponse::SharedCtor() { + request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_response_ = NULL; +} + +FetchConfigResponse::~FetchConfigResponse() { + // @@protoc_insertion_point(destructor:configserver.proto.v2.FetchConfigResponse) + SharedDtor(); +} + +void FetchConfigResponse::SharedDtor() { + request_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete error_response_; +} + +void FetchConfigResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ::google::protobuf::Descriptor* FetchConfigResponse::descriptor() { + ::protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const FetchConfigResponse& FetchConfigResponse::default_instance() { + ::google::protobuf::internal::InitSCC(&protobuf_v2_2fagent_2eproto::scc_info_FetchConfigResponse.base); + return *internal_default_instance(); +} + + +void FetchConfigResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:configserver.proto.v2.FetchConfigResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + config_details_.Clear(); + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && error_response_ != NULL) { + delete error_response_; + } + error_response_ = NULL; + _internal_metadata_.Clear(); +} + +bool FetchConfigResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:configserver.proto.v2.FetchConfigResponse) + 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)) { + // bytes request_id = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_request_id())); + } else { + goto handle_unusual; + } + break; + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_error_response())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .configserver.proto.v2.ConfigDetail config_details = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_config_details())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:configserver.proto.v2.FetchConfigResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:configserver.proto.v2.FetchConfigResponse) + return false; +#undef DO_ +} + +void FetchConfigResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:configserver.proto.v2.FetchConfigResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->request_id(), output); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->_internal_error_response(), output); + } + + // repeated .configserver.proto.v2.ConfigDetail config_details = 3; + for (unsigned int i = 0, + n = static_cast(this->config_details_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->config_details(static_cast(i)), + output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:configserver.proto.v2.FetchConfigResponse) +} + +::google::protobuf::uint8* FetchConfigResponse::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:configserver.proto.v2.FetchConfigResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->request_id(), target); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->_internal_error_response(), deterministic, target); + } + + // repeated .configserver.proto.v2.ConfigDetail config_details = 3; + for (unsigned int i = 0, + n = static_cast(this->config_details_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->config_details(static_cast(i)), deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:configserver.proto.v2.FetchConfigResponse) + return target; +} + +size_t FetchConfigResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:configserver.proto.v2.FetchConfigResponse) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .configserver.proto.v2.ConfigDetail config_details = 3; + { + unsigned int count = static_cast(this->config_details_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->config_details(static_cast(i))); + } + } + + // bytes request_id = 1; + if (this->request_id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->request_id()); + } + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + if (this->has_error_response()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *error_response_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchConfigResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:configserver.proto.v2.FetchConfigResponse) + GOOGLE_DCHECK_NE(&from, this); + const FetchConfigResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:configserver.proto.v2.FetchConfigResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:configserver.proto.v2.FetchConfigResponse) + MergeFrom(*source); + } +} + +void FetchConfigResponse::MergeFrom(const FetchConfigResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:configserver.proto.v2.FetchConfigResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + config_details_.MergeFrom(from.config_details_); + if (from.request_id().size() > 0) { + + request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_); + } + if (from.has_error_response()) { + mutable_error_response()->::configserver::proto::v2::ServerErrorResponse::MergeFrom(from.error_response()); + } +} + +void FetchConfigResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:configserver.proto.v2.FetchConfigResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FetchConfigResponse::CopyFrom(const FetchConfigResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:configserver.proto.v2.FetchConfigResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchConfigResponse::IsInitialized() const { + return true; +} + +void FetchConfigResponse::Swap(FetchConfigResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void FetchConfigResponse::InternalSwap(FetchConfigResponse* other) { + using std::swap; + CastToBase(&config_details_)->InternalSwap(CastToBase(&other->config_details_)); + request_id_.Swap(&other->request_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(error_response_, other->error_response_); + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata FetchConfigResponse::GetMetadata() const { + protobuf_v2_2fagent_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_v2_2fagent_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace v2 +} // namespace proto +} // namespace configserver +namespace google { +namespace protobuf { +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::AgentGroupTag* Arena::CreateMaybeMessage< ::configserver::proto::v2::AgentGroupTag >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::AgentGroupTag >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::ConfigInfo* Arena::CreateMaybeMessage< ::configserver::proto::v2::ConfigInfo >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::ConfigInfo >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::CommandInfo* Arena::CreateMaybeMessage< ::configserver::proto::v2::CommandInfo >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::CommandInfo >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse* Arena::CreateMaybeMessage< ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::AgentAttributes* Arena::CreateMaybeMessage< ::configserver::proto::v2::AgentAttributes >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::AgentAttributes >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::HeartbeatRequest* Arena::CreateMaybeMessage< ::configserver::proto::v2::HeartbeatRequest >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::HeartbeatRequest >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::ConfigDetail* Arena::CreateMaybeMessage< ::configserver::proto::v2::ConfigDetail >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::ConfigDetail >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::CommandDetail* Arena::CreateMaybeMessage< ::configserver::proto::v2::CommandDetail >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::CommandDetail >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::ServerErrorResponse* Arena::CreateMaybeMessage< ::configserver::proto::v2::ServerErrorResponse >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::ServerErrorResponse >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::HeartbeatResponse* Arena::CreateMaybeMessage< ::configserver::proto::v2::HeartbeatResponse >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::HeartbeatResponse >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::FetchConfigRequest* Arena::CreateMaybeMessage< ::configserver::proto::v2::FetchConfigRequest >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::FetchConfigRequest >(arena); +} +template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::configserver::proto::v2::FetchConfigResponse* Arena::CreateMaybeMessage< ::configserver::proto::v2::FetchConfigResponse >(Arena* arena) { + return Arena::CreateInternal< ::configserver::proto::v2::FetchConfigResponse >(arena); +} +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) diff --git a/core/config_server_pb/v2/agent.pb.h b/core/config_server_pb/v2/agent.pb.h new file mode 100644 index 0000000000..b9d9b16ecf --- /dev/null +++ b/core/config_server_pb/v2/agent.pb.h @@ -0,0 +1,4082 @@ +/* + * Copyright 2024 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: v2/agent.proto + +#ifndef PROTOBUF_INCLUDED_v2_2fagent_2eproto +#define PROTOBUF_INCLUDED_v2_2fagent_2eproto + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3006001 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#define PROTOBUF_INTERNAL_EXPORT_protobuf_v2_2fagent_2eproto + +namespace protobuf_v2_2fagent_2eproto { +// Internal implementation detail -- do not use these members. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[12]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void AddDescriptors(); +} // namespace protobuf_v2_2fagent_2eproto +namespace configserver { +namespace proto { +namespace v2 { +class AgentAttributes; +class AgentAttributesDefaultTypeInternal; +extern AgentAttributesDefaultTypeInternal _AgentAttributes_default_instance_; +class AgentAttributes_ExtrasEntry_DoNotUse; +class AgentAttributes_ExtrasEntry_DoNotUseDefaultTypeInternal; +extern AgentAttributes_ExtrasEntry_DoNotUseDefaultTypeInternal _AgentAttributes_ExtrasEntry_DoNotUse_default_instance_; +class AgentGroupTag; +class AgentGroupTagDefaultTypeInternal; +extern AgentGroupTagDefaultTypeInternal _AgentGroupTag_default_instance_; +class CommandDetail; +class CommandDetailDefaultTypeInternal; +extern CommandDetailDefaultTypeInternal _CommandDetail_default_instance_; +class CommandInfo; +class CommandInfoDefaultTypeInternal; +extern CommandInfoDefaultTypeInternal _CommandInfo_default_instance_; +class ConfigDetail; +class ConfigDetailDefaultTypeInternal; +extern ConfigDetailDefaultTypeInternal _ConfigDetail_default_instance_; +class ConfigInfo; +class ConfigInfoDefaultTypeInternal; +extern ConfigInfoDefaultTypeInternal _ConfigInfo_default_instance_; +class FetchConfigRequest; +class FetchConfigRequestDefaultTypeInternal; +extern FetchConfigRequestDefaultTypeInternal _FetchConfigRequest_default_instance_; +class FetchConfigResponse; +class FetchConfigResponseDefaultTypeInternal; +extern FetchConfigResponseDefaultTypeInternal _FetchConfigResponse_default_instance_; +class HeartbeatRequest; +class HeartbeatRequestDefaultTypeInternal; +extern HeartbeatRequestDefaultTypeInternal _HeartbeatRequest_default_instance_; +class HeartbeatResponse; +class HeartbeatResponseDefaultTypeInternal; +extern HeartbeatResponseDefaultTypeInternal _HeartbeatResponse_default_instance_; +class ServerErrorResponse; +class ServerErrorResponseDefaultTypeInternal; +extern ServerErrorResponseDefaultTypeInternal _ServerErrorResponse_default_instance_; +} // namespace v2 +} // namespace proto +} // namespace configserver +namespace google { +namespace protobuf { +template<> ::configserver::proto::v2::AgentAttributes* Arena::CreateMaybeMessage<::configserver::proto::v2::AgentAttributes>(Arena*); +template<> ::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse* Arena::CreateMaybeMessage<::configserver::proto::v2::AgentAttributes_ExtrasEntry_DoNotUse>(Arena*); +template<> ::configserver::proto::v2::AgentGroupTag* Arena::CreateMaybeMessage<::configserver::proto::v2::AgentGroupTag>(Arena*); +template<> ::configserver::proto::v2::CommandDetail* Arena::CreateMaybeMessage<::configserver::proto::v2::CommandDetail>(Arena*); +template<> ::configserver::proto::v2::CommandInfo* Arena::CreateMaybeMessage<::configserver::proto::v2::CommandInfo>(Arena*); +template<> ::configserver::proto::v2::ConfigDetail* Arena::CreateMaybeMessage<::configserver::proto::v2::ConfigDetail>(Arena*); +template<> ::configserver::proto::v2::ConfigInfo* Arena::CreateMaybeMessage<::configserver::proto::v2::ConfigInfo>(Arena*); +template<> ::configserver::proto::v2::FetchConfigRequest* Arena::CreateMaybeMessage<::configserver::proto::v2::FetchConfigRequest>(Arena*); +template<> ::configserver::proto::v2::FetchConfigResponse* Arena::CreateMaybeMessage<::configserver::proto::v2::FetchConfigResponse>(Arena*); +template<> ::configserver::proto::v2::HeartbeatRequest* Arena::CreateMaybeMessage<::configserver::proto::v2::HeartbeatRequest>(Arena*); +template<> ::configserver::proto::v2::HeartbeatResponse* Arena::CreateMaybeMessage<::configserver::proto::v2::HeartbeatResponse>(Arena*); +template<> ::configserver::proto::v2::ServerErrorResponse* Arena::CreateMaybeMessage<::configserver::proto::v2::ServerErrorResponse>(Arena*); +} // namespace protobuf +} // namespace google +namespace configserver { +namespace proto { +namespace v2 { + +enum ConfigStatus { + UNSET = 0, + APPLYING = 1, + APPLIED = 2, + FAILED = 3, + ConfigStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + ConfigStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool ConfigStatus_IsValid(int value); +const ConfigStatus ConfigStatus_MIN = UNSET; +const ConfigStatus ConfigStatus_MAX = FAILED; +const int ConfigStatus_ARRAYSIZE = ConfigStatus_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ConfigStatus_descriptor(); +inline const ::std::string& ConfigStatus_Name(ConfigStatus value) { + return ::google::protobuf::internal::NameOfEnum( + ConfigStatus_descriptor(), value); +} +inline bool ConfigStatus_Parse( + const ::std::string& name, ConfigStatus* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ConfigStatus_descriptor(), name, value); +} +enum AgentCapabilities { + UnspecifiedAgentCapability = 0, + AcceptsPipelineConfig = 1, + AcceptsProcessConfig = 2, + AcceptsCustomCommand = 4, + AgentCapabilities_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + AgentCapabilities_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool AgentCapabilities_IsValid(int value); +const AgentCapabilities AgentCapabilities_MIN = UnspecifiedAgentCapability; +const AgentCapabilities AgentCapabilities_MAX = AcceptsCustomCommand; +const int AgentCapabilities_ARRAYSIZE = AgentCapabilities_MAX + 1; + +const ::google::protobuf::EnumDescriptor* AgentCapabilities_descriptor(); +inline const ::std::string& AgentCapabilities_Name(AgentCapabilities value) { + return ::google::protobuf::internal::NameOfEnum( + AgentCapabilities_descriptor(), value); +} +inline bool AgentCapabilities_Parse( + const ::std::string& name, AgentCapabilities* value) { + return ::google::protobuf::internal::ParseNamedEnum( + AgentCapabilities_descriptor(), name, value); +} +enum RequestFlags { + RequestFlagsUnspecified = 0, + FullState = 1, + RequestFlags_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + RequestFlags_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool RequestFlags_IsValid(int value); +const RequestFlags RequestFlags_MIN = RequestFlagsUnspecified; +const RequestFlags RequestFlags_MAX = FullState; +const int RequestFlags_ARRAYSIZE = RequestFlags_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestFlags_descriptor(); +inline const ::std::string& RequestFlags_Name(RequestFlags value) { + return ::google::protobuf::internal::NameOfEnum( + RequestFlags_descriptor(), value); +} +inline bool RequestFlags_Parse( + const ::std::string& name, RequestFlags* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestFlags_descriptor(), name, value); +} +enum ServerCapabilities { + UnspecifiedServerCapability = 0, + RembersAttribute = 1, + RembersPipelineConfigStatus = 2, + RembersProcessConfigStatus = 4, + RembersCustomCommandStatus = 8, + ServerCapabilities_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + ServerCapabilities_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool ServerCapabilities_IsValid(int value); +const ServerCapabilities ServerCapabilities_MIN = UnspecifiedServerCapability; +const ServerCapabilities ServerCapabilities_MAX = RembersCustomCommandStatus; +const int ServerCapabilities_ARRAYSIZE = ServerCapabilities_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ServerCapabilities_descriptor(); +inline const ::std::string& ServerCapabilities_Name(ServerCapabilities value) { + return ::google::protobuf::internal::NameOfEnum( + ServerCapabilities_descriptor(), value); +} +inline bool ServerCapabilities_Parse( + const ::std::string& name, ServerCapabilities* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ServerCapabilities_descriptor(), name, value); +} +enum ResponseFlags { + ResponseFlagsUnspecified = 0, + ReportFullState = 1, + FetchPipelineConfigDetail = 2, + FetchProcessConfigDetail = 4, + ResponseFlags_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + ResponseFlags_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool ResponseFlags_IsValid(int value); +const ResponseFlags ResponseFlags_MIN = ResponseFlagsUnspecified; +const ResponseFlags ResponseFlags_MAX = FetchProcessConfigDetail; +const int ResponseFlags_ARRAYSIZE = ResponseFlags_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ResponseFlags_descriptor(); +inline const ::std::string& ResponseFlags_Name(ResponseFlags value) { + return ::google::protobuf::internal::NameOfEnum( + ResponseFlags_descriptor(), value); +} +inline bool ResponseFlags_Parse( + const ::std::string& name, ResponseFlags* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ResponseFlags_descriptor(), name, value); +} +// =================================================================== + +class AgentGroupTag : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.AgentGroupTag) */ { + public: + AgentGroupTag(); + virtual ~AgentGroupTag(); + + AgentGroupTag(const AgentGroupTag& from); + + inline AgentGroupTag& operator=(const AgentGroupTag& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + AgentGroupTag(AgentGroupTag&& from) noexcept + : AgentGroupTag() { + *this = ::std::move(from); + } + + inline AgentGroupTag& operator=(AgentGroupTag&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const AgentGroupTag& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AgentGroupTag* internal_default_instance() { + return reinterpret_cast( + &_AgentGroupTag_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void Swap(AgentGroupTag* other); + friend void swap(AgentGroupTag& a, AgentGroupTag& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline AgentGroupTag* New() const final { + return CreateMaybeMessage(NULL); + } + + AgentGroupTag* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const AgentGroupTag& from); + void MergeFrom(const AgentGroupTag& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AgentGroupTag* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // string value = 2; + void clear_value(); + static const int kValueFieldNumber = 2; + const ::std::string& value() const; + void set_value(const ::std::string& value); + #if LANG_CXX11 + void set_value(::std::string&& value); + #endif + void set_value(const char* value); + void set_value(const char* value, size_t size); + ::std::string* mutable_value(); + ::std::string* release_value(); + void set_allocated_value(::std::string* value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.AgentGroupTag) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr value_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class ConfigInfo : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.ConfigInfo) */ { + public: + ConfigInfo(); + virtual ~ConfigInfo(); + + ConfigInfo(const ConfigInfo& from); + + inline ConfigInfo& operator=(const ConfigInfo& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ConfigInfo(ConfigInfo&& from) noexcept + : ConfigInfo() { + *this = ::std::move(from); + } + + inline ConfigInfo& operator=(ConfigInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const ConfigInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ConfigInfo* internal_default_instance() { + return reinterpret_cast( + &_ConfigInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void Swap(ConfigInfo* other); + friend void swap(ConfigInfo& a, ConfigInfo& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ConfigInfo* New() const final { + return CreateMaybeMessage(NULL); + } + + ConfigInfo* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ConfigInfo& from); + void MergeFrom(const ConfigInfo& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConfigInfo* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // string message = 4; + void clear_message(); + static const int kMessageFieldNumber = 4; + const ::std::string& message() const; + void set_message(const ::std::string& value); + #if LANG_CXX11 + void set_message(::std::string&& value); + #endif + void set_message(const char* value); + void set_message(const char* value, size_t size); + ::std::string* mutable_message(); + ::std::string* release_message(); + void set_allocated_message(::std::string* message); + + // int64 version = 2; + void clear_version(); + static const int kVersionFieldNumber = 2; + ::google::protobuf::int64 version() const; + void set_version(::google::protobuf::int64 value); + + // .configserver.proto.v2.ConfigStatus status = 3; + void clear_status(); + static const int kStatusFieldNumber = 3; + ::configserver::proto::v2::ConfigStatus status() const; + void set_status(::configserver::proto::v2::ConfigStatus value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.ConfigInfo) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr message_; + ::google::protobuf::int64 version_; + int status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class CommandInfo : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.CommandInfo) */ { + public: + CommandInfo(); + virtual ~CommandInfo(); + + CommandInfo(const CommandInfo& from); + + inline CommandInfo& operator=(const CommandInfo& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + CommandInfo(CommandInfo&& from) noexcept + : CommandInfo() { + *this = ::std::move(from); + } + + inline CommandInfo& operator=(CommandInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const CommandInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const CommandInfo* internal_default_instance() { + return reinterpret_cast( + &_CommandInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + void Swap(CommandInfo* other); + friend void swap(CommandInfo& a, CommandInfo& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline CommandInfo* New() const final { + return CreateMaybeMessage(NULL); + } + + CommandInfo* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const CommandInfo& from); + void MergeFrom(const CommandInfo& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CommandInfo* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string type = 1; + void clear_type(); + static const int kTypeFieldNumber = 1; + const ::std::string& type() const; + void set_type(const ::std::string& value); + #if LANG_CXX11 + void set_type(::std::string&& value); + #endif + void set_type(const char* value); + void set_type(const char* value, size_t size); + ::std::string* mutable_type(); + ::std::string* release_type(); + void set_allocated_type(::std::string* type); + + // string name = 2; + void clear_name(); + static const int kNameFieldNumber = 2; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // string message = 4; + void clear_message(); + static const int kMessageFieldNumber = 4; + const ::std::string& message() const; + void set_message(const ::std::string& value); + #if LANG_CXX11 + void set_message(::std::string&& value); + #endif + void set_message(const char* value); + void set_message(const char* value, size_t size); + ::std::string* mutable_message(); + ::std::string* release_message(); + void set_allocated_message(::std::string* message); + + // .configserver.proto.v2.ConfigStatus status = 3; + void clear_status(); + static const int kStatusFieldNumber = 3; + ::configserver::proto::v2::ConfigStatus status() const; + void set_status(::configserver::proto::v2::ConfigStatus value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.CommandInfo) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr type_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr message_; + int status_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class AgentAttributes_ExtrasEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { +public: + typedef ::google::protobuf::internal::MapEntry SuperType; + AgentAttributes_ExtrasEntry_DoNotUse(); + AgentAttributes_ExtrasEntry_DoNotUse(::google::protobuf::Arena* arena); + void MergeFrom(const AgentAttributes_ExtrasEntry_DoNotUse& other); + static const AgentAttributes_ExtrasEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AgentAttributes_ExtrasEntry_DoNotUse_default_instance_); } + void MergeFrom(const ::google::protobuf::Message& other) final; + ::google::protobuf::Metadata GetMetadata() const; +}; + +// ------------------------------------------------------------------- + +class AgentAttributes : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.AgentAttributes) */ { + public: + AgentAttributes(); + virtual ~AgentAttributes(); + + AgentAttributes(const AgentAttributes& from); + + inline AgentAttributes& operator=(const AgentAttributes& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + AgentAttributes(AgentAttributes&& from) noexcept + : AgentAttributes() { + *this = ::std::move(from); + } + + inline AgentAttributes& operator=(AgentAttributes&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const AgentAttributes& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AgentAttributes* internal_default_instance() { + return reinterpret_cast( + &_AgentAttributes_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + void Swap(AgentAttributes* other); + friend void swap(AgentAttributes& a, AgentAttributes& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline AgentAttributes* New() const final { + return CreateMaybeMessage(NULL); + } + + AgentAttributes* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const AgentAttributes& from); + void MergeFrom(const AgentAttributes& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AgentAttributes* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // map extras = 100; + int extras_size() const; + void clear_extras(); + static const int kExtrasFieldNumber = 100; + const ::google::protobuf::Map< ::std::string, ::std::string >& + extras() const; + ::google::protobuf::Map< ::std::string, ::std::string >* + mutable_extras(); + + // bytes version = 1; + void clear_version(); + static const int kVersionFieldNumber = 1; + const ::std::string& version() const; + void set_version(const ::std::string& value); + #if LANG_CXX11 + void set_version(::std::string&& value); + #endif + void set_version(const char* value); + void set_version(const void* value, size_t size); + ::std::string* mutable_version(); + ::std::string* release_version(); + void set_allocated_version(::std::string* version); + + // bytes ip = 2; + void clear_ip(); + static const int kIpFieldNumber = 2; + const ::std::string& ip() const; + void set_ip(const ::std::string& value); + #if LANG_CXX11 + void set_ip(::std::string&& value); + #endif + void set_ip(const char* value); + void set_ip(const void* value, size_t size); + ::std::string* mutable_ip(); + ::std::string* release_ip(); + void set_allocated_ip(::std::string* ip); + + // bytes hostname = 3; + void clear_hostname(); + static const int kHostnameFieldNumber = 3; + const ::std::string& hostname() const; + void set_hostname(const ::std::string& value); + #if LANG_CXX11 + void set_hostname(::std::string&& value); + #endif + void set_hostname(const char* value); + void set_hostname(const void* value, size_t size); + ::std::string* mutable_hostname(); + ::std::string* release_hostname(); + void set_allocated_hostname(::std::string* hostname); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.AgentAttributes) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::MapField< + AgentAttributes_ExtrasEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_BYTES, + 0 > extras_; + ::google::protobuf::internal::ArenaStringPtr version_; + ::google::protobuf::internal::ArenaStringPtr ip_; + ::google::protobuf::internal::ArenaStringPtr hostname_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class HeartbeatRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.HeartbeatRequest) */ { + public: + HeartbeatRequest(); + virtual ~HeartbeatRequest(); + + HeartbeatRequest(const HeartbeatRequest& from); + + inline HeartbeatRequest& operator=(const HeartbeatRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + HeartbeatRequest(HeartbeatRequest&& from) noexcept + : HeartbeatRequest() { + *this = ::std::move(from); + } + + inline HeartbeatRequest& operator=(HeartbeatRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const HeartbeatRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HeartbeatRequest* internal_default_instance() { + return reinterpret_cast( + &_HeartbeatRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + void Swap(HeartbeatRequest* other); + friend void swap(HeartbeatRequest& a, HeartbeatRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline HeartbeatRequest* New() const final { + return CreateMaybeMessage(NULL); + } + + HeartbeatRequest* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const HeartbeatRequest& from); + void MergeFrom(const HeartbeatRequest& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HeartbeatRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .configserver.proto.v2.AgentGroupTag tags = 7; + int tags_size() const; + void clear_tags(); + static const int kTagsFieldNumber = 7; + ::configserver::proto::v2::AgentGroupTag* mutable_tags(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::AgentGroupTag >* + mutable_tags(); + const ::configserver::proto::v2::AgentGroupTag& tags(int index) const; + ::configserver::proto::v2::AgentGroupTag* add_tags(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::AgentGroupTag >& + tags() const; + + // repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; + int pipeline_configs_size() const; + void clear_pipeline_configs(); + static const int kPipelineConfigsFieldNumber = 10; + ::configserver::proto::v2::ConfigInfo* mutable_pipeline_configs(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* + mutable_pipeline_configs(); + const ::configserver::proto::v2::ConfigInfo& pipeline_configs(int index) const; + ::configserver::proto::v2::ConfigInfo* add_pipeline_configs(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& + pipeline_configs() const; + + // repeated .configserver.proto.v2.ConfigInfo process_configs = 11; + int process_configs_size() const; + void clear_process_configs(); + static const int kProcessConfigsFieldNumber = 11; + ::configserver::proto::v2::ConfigInfo* mutable_process_configs(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* + mutable_process_configs(); + const ::configserver::proto::v2::ConfigInfo& process_configs(int index) const; + ::configserver::proto::v2::ConfigInfo* add_process_configs(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& + process_configs() const; + + // repeated .configserver.proto.v2.CommandInfo custom_commands = 12; + int custom_commands_size() const; + void clear_custom_commands(); + static const int kCustomCommandsFieldNumber = 12; + ::configserver::proto::v2::CommandInfo* mutable_custom_commands(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandInfo >* + mutable_custom_commands(); + const ::configserver::proto::v2::CommandInfo& custom_commands(int index) const; + ::configserver::proto::v2::CommandInfo* add_custom_commands(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandInfo >& + custom_commands() const; + + // bytes request_id = 1; + void clear_request_id(); + static const int kRequestIdFieldNumber = 1; + const ::std::string& request_id() const; + void set_request_id(const ::std::string& value); + #if LANG_CXX11 + void set_request_id(::std::string&& value); + #endif + void set_request_id(const char* value); + void set_request_id(const void* value, size_t size); + ::std::string* mutable_request_id(); + ::std::string* release_request_id(); + void set_allocated_request_id(::std::string* request_id); + + // bytes instance_id = 4; + void clear_instance_id(); + static const int kInstanceIdFieldNumber = 4; + const ::std::string& instance_id() const; + void set_instance_id(const ::std::string& value); + #if LANG_CXX11 + void set_instance_id(::std::string&& value); + #endif + void set_instance_id(const char* value); + void set_instance_id(const void* value, size_t size); + ::std::string* mutable_instance_id(); + ::std::string* release_instance_id(); + void set_allocated_instance_id(::std::string* instance_id); + + // string agent_type = 5; + void clear_agent_type(); + static const int kAgentTypeFieldNumber = 5; + const ::std::string& agent_type() const; + void set_agent_type(const ::std::string& value); + #if LANG_CXX11 + void set_agent_type(::std::string&& value); + #endif + void set_agent_type(const char* value); + void set_agent_type(const char* value, size_t size); + ::std::string* mutable_agent_type(); + ::std::string* release_agent_type(); + void set_allocated_agent_type(::std::string* agent_type); + + // string running_status = 8; + void clear_running_status(); + static const int kRunningStatusFieldNumber = 8; + const ::std::string& running_status() const; + void set_running_status(const ::std::string& value); + #if LANG_CXX11 + void set_running_status(::std::string&& value); + #endif + void set_running_status(const char* value); + void set_running_status(const char* value, size_t size); + ::std::string* mutable_running_status(); + ::std::string* release_running_status(); + void set_allocated_running_status(::std::string* running_status); + + // bytes opaque = 14; + void clear_opaque(); + static const int kOpaqueFieldNumber = 14; + const ::std::string& opaque() const; + void set_opaque(const ::std::string& value); + #if LANG_CXX11 + void set_opaque(::std::string&& value); + #endif + void set_opaque(const char* value); + void set_opaque(const void* value, size_t size); + ::std::string* mutable_opaque(); + ::std::string* release_opaque(); + void set_allocated_opaque(::std::string* opaque); + + // .configserver.proto.v2.AgentAttributes attributes = 6; + bool has_attributes() const; + void clear_attributes(); + static const int kAttributesFieldNumber = 6; + private: + const ::configserver::proto::v2::AgentAttributes& _internal_attributes() const; + public: + const ::configserver::proto::v2::AgentAttributes& attributes() const; + ::configserver::proto::v2::AgentAttributes* release_attributes(); + ::configserver::proto::v2::AgentAttributes* mutable_attributes(); + void set_allocated_attributes(::configserver::proto::v2::AgentAttributes* attributes); + + // uint64 sequence_num = 2; + void clear_sequence_num(); + static const int kSequenceNumFieldNumber = 2; + ::google::protobuf::uint64 sequence_num() const; + void set_sequence_num(::google::protobuf::uint64 value); + + // uint64 capabilities = 3; + void clear_capabilities(); + static const int kCapabilitiesFieldNumber = 3; + ::google::protobuf::uint64 capabilities() const; + void set_capabilities(::google::protobuf::uint64 value); + + // int64 startup_time = 9; + void clear_startup_time(); + static const int kStartupTimeFieldNumber = 9; + ::google::protobuf::int64 startup_time() const; + void set_startup_time(::google::protobuf::int64 value); + + // uint64 flags = 13; + void clear_flags(); + static const int kFlagsFieldNumber = 13; + ::google::protobuf::uint64 flags() const; + void set_flags(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.HeartbeatRequest) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::AgentGroupTag > tags_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo > pipeline_configs_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo > process_configs_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandInfo > custom_commands_; + ::google::protobuf::internal::ArenaStringPtr request_id_; + ::google::protobuf::internal::ArenaStringPtr instance_id_; + ::google::protobuf::internal::ArenaStringPtr agent_type_; + ::google::protobuf::internal::ArenaStringPtr running_status_; + ::google::protobuf::internal::ArenaStringPtr opaque_; + ::configserver::proto::v2::AgentAttributes* attributes_; + ::google::protobuf::uint64 sequence_num_; + ::google::protobuf::uint64 capabilities_; + ::google::protobuf::int64 startup_time_; + ::google::protobuf::uint64 flags_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class ConfigDetail : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.ConfigDetail) */ { + public: + ConfigDetail(); + virtual ~ConfigDetail(); + + ConfigDetail(const ConfigDetail& from); + + inline ConfigDetail& operator=(const ConfigDetail& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ConfigDetail(ConfigDetail&& from) noexcept + : ConfigDetail() { + *this = ::std::move(from); + } + + inline ConfigDetail& operator=(ConfigDetail&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const ConfigDetail& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ConfigDetail* internal_default_instance() { + return reinterpret_cast( + &_ConfigDetail_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + void Swap(ConfigDetail* other); + friend void swap(ConfigDetail& a, ConfigDetail& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ConfigDetail* New() const final { + return CreateMaybeMessage(NULL); + } + + ConfigDetail* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ConfigDetail& from); + void MergeFrom(const ConfigDetail& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ConfigDetail* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // bytes detail = 3; + void clear_detail(); + static const int kDetailFieldNumber = 3; + const ::std::string& detail() const; + void set_detail(const ::std::string& value); + #if LANG_CXX11 + void set_detail(::std::string&& value); + #endif + void set_detail(const char* value); + void set_detail(const void* value, size_t size); + ::std::string* mutable_detail(); + ::std::string* release_detail(); + void set_allocated_detail(::std::string* detail); + + // int64 version = 2; + void clear_version(); + static const int kVersionFieldNumber = 2; + ::google::protobuf::int64 version() const; + void set_version(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.ConfigDetail) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr detail_; + ::google::protobuf::int64 version_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class CommandDetail : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.CommandDetail) */ { + public: + CommandDetail(); + virtual ~CommandDetail(); + + CommandDetail(const CommandDetail& from); + + inline CommandDetail& operator=(const CommandDetail& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + CommandDetail(CommandDetail&& from) noexcept + : CommandDetail() { + *this = ::std::move(from); + } + + inline CommandDetail& operator=(CommandDetail&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const CommandDetail& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const CommandDetail* internal_default_instance() { + return reinterpret_cast( + &_CommandDetail_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + void Swap(CommandDetail* other); + friend void swap(CommandDetail& a, CommandDetail& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline CommandDetail* New() const final { + return CreateMaybeMessage(NULL); + } + + CommandDetail* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const CommandDetail& from); + void MergeFrom(const CommandDetail& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CommandDetail* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string type = 1; + void clear_type(); + static const int kTypeFieldNumber = 1; + const ::std::string& type() const; + void set_type(const ::std::string& value); + #if LANG_CXX11 + void set_type(::std::string&& value); + #endif + void set_type(const char* value); + void set_type(const char* value, size_t size); + ::std::string* mutable_type(); + ::std::string* release_type(); + void set_allocated_type(::std::string* type); + + // string name = 2; + void clear_name(); + static const int kNameFieldNumber = 2; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // bytes detail = 3; + void clear_detail(); + static const int kDetailFieldNumber = 3; + const ::std::string& detail() const; + void set_detail(const ::std::string& value); + #if LANG_CXX11 + void set_detail(::std::string&& value); + #endif + void set_detail(const char* value); + void set_detail(const void* value, size_t size); + ::std::string* mutable_detail(); + ::std::string* release_detail(); + void set_allocated_detail(::std::string* detail); + + // int64 expire_time = 4; + void clear_expire_time(); + static const int kExpireTimeFieldNumber = 4; + ::google::protobuf::int64 expire_time() const; + void set_expire_time(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.CommandDetail) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr type_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr detail_; + ::google::protobuf::int64 expire_time_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class ServerErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.ServerErrorResponse) */ { + public: + ServerErrorResponse(); + virtual ~ServerErrorResponse(); + + ServerErrorResponse(const ServerErrorResponse& from); + + inline ServerErrorResponse& operator=(const ServerErrorResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ServerErrorResponse(ServerErrorResponse&& from) noexcept + : ServerErrorResponse() { + *this = ::std::move(from); + } + + inline ServerErrorResponse& operator=(ServerErrorResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const ServerErrorResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ServerErrorResponse* internal_default_instance() { + return reinterpret_cast( + &_ServerErrorResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + void Swap(ServerErrorResponse* other); + friend void swap(ServerErrorResponse& a, ServerErrorResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ServerErrorResponse* New() const final { + return CreateMaybeMessage(NULL); + } + + ServerErrorResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ServerErrorResponse& from); + void MergeFrom(const ServerErrorResponse& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ServerErrorResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string error_message = 2; + void clear_error_message(); + static const int kErrorMessageFieldNumber = 2; + const ::std::string& error_message() const; + void set_error_message(const ::std::string& value); + #if LANG_CXX11 + void set_error_message(::std::string&& value); + #endif + void set_error_message(const char* value); + void set_error_message(const char* value, size_t size); + ::std::string* mutable_error_message(); + ::std::string* release_error_message(); + void set_allocated_error_message(::std::string* error_message); + + // int32 error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::google::protobuf::int32 error_code() const; + void set_error_code(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.ServerErrorResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr error_message_; + ::google::protobuf::int32 error_code_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class HeartbeatResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.HeartbeatResponse) */ { + public: + HeartbeatResponse(); + virtual ~HeartbeatResponse(); + + HeartbeatResponse(const HeartbeatResponse& from); + + inline HeartbeatResponse& operator=(const HeartbeatResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + HeartbeatResponse(HeartbeatResponse&& from) noexcept + : HeartbeatResponse() { + *this = ::std::move(from); + } + + inline HeartbeatResponse& operator=(HeartbeatResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const HeartbeatResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HeartbeatResponse* internal_default_instance() { + return reinterpret_cast( + &_HeartbeatResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + void Swap(HeartbeatResponse* other); + friend void swap(HeartbeatResponse& a, HeartbeatResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline HeartbeatResponse* New() const final { + return CreateMaybeMessage(NULL); + } + + HeartbeatResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const HeartbeatResponse& from); + void MergeFrom(const HeartbeatResponse& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HeartbeatResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; + int pipeline_config_updates_size() const; + void clear_pipeline_config_updates(); + static const int kPipelineConfigUpdatesFieldNumber = 4; + ::configserver::proto::v2::ConfigDetail* mutable_pipeline_config_updates(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* + mutable_pipeline_config_updates(); + const ::configserver::proto::v2::ConfigDetail& pipeline_config_updates(int index) const; + ::configserver::proto::v2::ConfigDetail* add_pipeline_config_updates(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& + pipeline_config_updates() const; + + // repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; + int process_config_updates_size() const; + void clear_process_config_updates(); + static const int kProcessConfigUpdatesFieldNumber = 5; + ::configserver::proto::v2::ConfigDetail* mutable_process_config_updates(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* + mutable_process_config_updates(); + const ::configserver::proto::v2::ConfigDetail& process_config_updates(int index) const; + ::configserver::proto::v2::ConfigDetail* add_process_config_updates(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& + process_config_updates() const; + + // repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; + int custom_command_updates_size() const; + void clear_custom_command_updates(); + static const int kCustomCommandUpdatesFieldNumber = 6; + ::configserver::proto::v2::CommandDetail* mutable_custom_command_updates(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandDetail >* + mutable_custom_command_updates(); + const ::configserver::proto::v2::CommandDetail& custom_command_updates(int index) const; + ::configserver::proto::v2::CommandDetail* add_custom_command_updates(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandDetail >& + custom_command_updates() const; + + // bytes request_id = 1; + void clear_request_id(); + static const int kRequestIdFieldNumber = 1; + const ::std::string& request_id() const; + void set_request_id(const ::std::string& value); + #if LANG_CXX11 + void set_request_id(::std::string&& value); + #endif + void set_request_id(const char* value); + void set_request_id(const void* value, size_t size); + ::std::string* mutable_request_id(); + ::std::string* release_request_id(); + void set_allocated_request_id(::std::string* request_id); + + // bytes opaque = 8; + void clear_opaque(); + static const int kOpaqueFieldNumber = 8; + const ::std::string& opaque() const; + void set_opaque(const ::std::string& value); + #if LANG_CXX11 + void set_opaque(::std::string&& value); + #endif + void set_opaque(const char* value); + void set_opaque(const void* value, size_t size); + ::std::string* mutable_opaque(); + ::std::string* release_opaque(); + void set_allocated_opaque(::std::string* opaque); + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + bool has_error_response() const; + void clear_error_response(); + static const int kErrorResponseFieldNumber = 2; + private: + const ::configserver::proto::v2::ServerErrorResponse& _internal_error_response() const; + public: + const ::configserver::proto::v2::ServerErrorResponse& error_response() const; + ::configserver::proto::v2::ServerErrorResponse* release_error_response(); + ::configserver::proto::v2::ServerErrorResponse* mutable_error_response(); + void set_allocated_error_response(::configserver::proto::v2::ServerErrorResponse* error_response); + + // uint64 capabilities = 3; + void clear_capabilities(); + static const int kCapabilitiesFieldNumber = 3; + ::google::protobuf::uint64 capabilities() const; + void set_capabilities(::google::protobuf::uint64 value); + + // uint64 flags = 7; + void clear_flags(); + static const int kFlagsFieldNumber = 7; + ::google::protobuf::uint64 flags() const; + void set_flags(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.HeartbeatResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail > pipeline_config_updates_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail > process_config_updates_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandDetail > custom_command_updates_; + ::google::protobuf::internal::ArenaStringPtr request_id_; + ::google::protobuf::internal::ArenaStringPtr opaque_; + ::configserver::proto::v2::ServerErrorResponse* error_response_; + ::google::protobuf::uint64 capabilities_; + ::google::protobuf::uint64 flags_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class FetchConfigRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.FetchConfigRequest) */ { + public: + FetchConfigRequest(); + virtual ~FetchConfigRequest(); + + FetchConfigRequest(const FetchConfigRequest& from); + + inline FetchConfigRequest& operator=(const FetchConfigRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + FetchConfigRequest(FetchConfigRequest&& from) noexcept + : FetchConfigRequest() { + *this = ::std::move(from); + } + + inline FetchConfigRequest& operator=(FetchConfigRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const FetchConfigRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const FetchConfigRequest* internal_default_instance() { + return reinterpret_cast( + &_FetchConfigRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + void Swap(FetchConfigRequest* other); + friend void swap(FetchConfigRequest& a, FetchConfigRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline FetchConfigRequest* New() const final { + return CreateMaybeMessage(NULL); + } + + FetchConfigRequest* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const FetchConfigRequest& from); + void MergeFrom(const FetchConfigRequest& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FetchConfigRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .configserver.proto.v2.ConfigInfo req_configs = 3; + int req_configs_size() const; + void clear_req_configs(); + static const int kReqConfigsFieldNumber = 3; + ::configserver::proto::v2::ConfigInfo* mutable_req_configs(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* + mutable_req_configs(); + const ::configserver::proto::v2::ConfigInfo& req_configs(int index) const; + ::configserver::proto::v2::ConfigInfo* add_req_configs(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& + req_configs() const; + + // bytes request_id = 1; + void clear_request_id(); + static const int kRequestIdFieldNumber = 1; + const ::std::string& request_id() const; + void set_request_id(const ::std::string& value); + #if LANG_CXX11 + void set_request_id(::std::string&& value); + #endif + void set_request_id(const char* value); + void set_request_id(const void* value, size_t size); + ::std::string* mutable_request_id(); + ::std::string* release_request_id(); + void set_allocated_request_id(::std::string* request_id); + + // bytes instance_id = 2; + void clear_instance_id(); + static const int kInstanceIdFieldNumber = 2; + const ::std::string& instance_id() const; + void set_instance_id(const ::std::string& value); + #if LANG_CXX11 + void set_instance_id(::std::string&& value); + #endif + void set_instance_id(const char* value); + void set_instance_id(const void* value, size_t size); + ::std::string* mutable_instance_id(); + ::std::string* release_instance_id(); + void set_allocated_instance_id(::std::string* instance_id); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.FetchConfigRequest) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo > req_configs_; + ::google::protobuf::internal::ArenaStringPtr request_id_; + ::google::protobuf::internal::ArenaStringPtr instance_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// ------------------------------------------------------------------- + +class FetchConfigResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:configserver.proto.v2.FetchConfigResponse) */ { + public: + FetchConfigResponse(); + virtual ~FetchConfigResponse(); + + FetchConfigResponse(const FetchConfigResponse& from); + + inline FetchConfigResponse& operator=(const FetchConfigResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + FetchConfigResponse(FetchConfigResponse&& from) noexcept + : FetchConfigResponse() { + *this = ::std::move(from); + } + + inline FetchConfigResponse& operator=(FetchConfigResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const FetchConfigResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const FetchConfigResponse* internal_default_instance() { + return reinterpret_cast( + &_FetchConfigResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + void Swap(FetchConfigResponse* other); + friend void swap(FetchConfigResponse& a, FetchConfigResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline FetchConfigResponse* New() const final { + return CreateMaybeMessage(NULL); + } + + FetchConfigResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const FetchConfigResponse& from); + void MergeFrom(const FetchConfigResponse& from); + void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FetchConfigResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .configserver.proto.v2.ConfigDetail config_details = 3; + int config_details_size() const; + void clear_config_details(); + static const int kConfigDetailsFieldNumber = 3; + ::configserver::proto::v2::ConfigDetail* mutable_config_details(int index); + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* + mutable_config_details(); + const ::configserver::proto::v2::ConfigDetail& config_details(int index) const; + ::configserver::proto::v2::ConfigDetail* add_config_details(); + const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& + config_details() const; + + // bytes request_id = 1; + void clear_request_id(); + static const int kRequestIdFieldNumber = 1; + const ::std::string& request_id() const; + void set_request_id(const ::std::string& value); + #if LANG_CXX11 + void set_request_id(::std::string&& value); + #endif + void set_request_id(const char* value); + void set_request_id(const void* value, size_t size); + ::std::string* mutable_request_id(); + ::std::string* release_request_id(); + void set_allocated_request_id(::std::string* request_id); + + // .configserver.proto.v2.ServerErrorResponse error_response = 2; + bool has_error_response() const; + void clear_error_response(); + static const int kErrorResponseFieldNumber = 2; + private: + const ::configserver::proto::v2::ServerErrorResponse& _internal_error_response() const; + public: + const ::configserver::proto::v2::ServerErrorResponse& error_response() const; + ::configserver::proto::v2::ServerErrorResponse* release_error_response(); + ::configserver::proto::v2::ServerErrorResponse* mutable_error_response(); + void set_allocated_error_response(::configserver::proto::v2::ServerErrorResponse* error_response); + + // @@protoc_insertion_point(class_scope:configserver.proto.v2.FetchConfigResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail > config_details_; + ::google::protobuf::internal::ArenaStringPtr request_id_; + ::configserver::proto::v2::ServerErrorResponse* error_response_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::protobuf_v2_2fagent_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AgentGroupTag + +// string name = 1; +inline void AgentGroupTag::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& AgentGroupTag::name() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.AgentGroupTag.name) + return name_.GetNoArena(); +} +inline void AgentGroupTag::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.AgentGroupTag.name) +} +#if LANG_CXX11 +inline void AgentGroupTag::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.AgentGroupTag.name) +} +#endif +inline void AgentGroupTag::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.AgentGroupTag.name) +} +inline void AgentGroupTag::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.AgentGroupTag.name) +} +inline ::std::string* AgentGroupTag::mutable_name() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.AgentGroupTag.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AgentGroupTag::release_name() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.AgentGroupTag.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AgentGroupTag::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.AgentGroupTag.name) +} + +// string value = 2; +inline void AgentGroupTag::clear_value() { + value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& AgentGroupTag::value() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.AgentGroupTag.value) + return value_.GetNoArena(); +} +inline void AgentGroupTag::set_value(const ::std::string& value) { + + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.AgentGroupTag.value) +} +#if LANG_CXX11 +inline void AgentGroupTag::set_value(::std::string&& value) { + + value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.AgentGroupTag.value) +} +#endif +inline void AgentGroupTag::set_value(const char* value) { + GOOGLE_DCHECK(value != NULL); + + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.AgentGroupTag.value) +} +inline void AgentGroupTag::set_value(const char* value, size_t size) { + + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.AgentGroupTag.value) +} +inline ::std::string* AgentGroupTag::mutable_value() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.AgentGroupTag.value) + return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AgentGroupTag::release_value() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.AgentGroupTag.value) + + return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AgentGroupTag::set_allocated_value(::std::string* value) { + if (value != NULL) { + + } else { + + } + value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.AgentGroupTag.value) +} + +// ------------------------------------------------------------------- + +// ConfigInfo + +// string name = 1; +inline void ConfigInfo::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ConfigInfo::name() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigInfo.name) + return name_.GetNoArena(); +} +inline void ConfigInfo::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigInfo.name) +} +#if LANG_CXX11 +inline void ConfigInfo::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.ConfigInfo.name) +} +#endif +inline void ConfigInfo::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.ConfigInfo.name) +} +inline void ConfigInfo::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.ConfigInfo.name) +} +inline ::std::string* ConfigInfo::mutable_name() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.ConfigInfo.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ConfigInfo::release_name() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.ConfigInfo.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ConfigInfo::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.ConfigInfo.name) +} + +// int64 version = 2; +inline void ConfigInfo::clear_version() { + version_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 ConfigInfo::version() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigInfo.version) + return version_; +} +inline void ConfigInfo::set_version(::google::protobuf::int64 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigInfo.version) +} + +// .configserver.proto.v2.ConfigStatus status = 3; +inline void ConfigInfo::clear_status() { + status_ = 0; +} +inline ::configserver::proto::v2::ConfigStatus ConfigInfo::status() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigInfo.status) + return static_cast< ::configserver::proto::v2::ConfigStatus >(status_); +} +inline void ConfigInfo::set_status(::configserver::proto::v2::ConfigStatus value) { + + status_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigInfo.status) +} + +// string message = 4; +inline void ConfigInfo::clear_message() { + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ConfigInfo::message() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigInfo.message) + return message_.GetNoArena(); +} +inline void ConfigInfo::set_message(const ::std::string& value) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigInfo.message) +} +#if LANG_CXX11 +inline void ConfigInfo::set_message(::std::string&& value) { + + message_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.ConfigInfo.message) +} +#endif +inline void ConfigInfo::set_message(const char* value) { + GOOGLE_DCHECK(value != NULL); + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.ConfigInfo.message) +} +inline void ConfigInfo::set_message(const char* value, size_t size) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.ConfigInfo.message) +} +inline ::std::string* ConfigInfo::mutable_message() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.ConfigInfo.message) + return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ConfigInfo::release_message() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.ConfigInfo.message) + + return message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ConfigInfo::set_allocated_message(::std::string* message) { + if (message != NULL) { + + } else { + + } + message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.ConfigInfo.message) +} + +// ------------------------------------------------------------------- + +// CommandInfo + +// string type = 1; +inline void CommandInfo::clear_type() { + type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandInfo::type() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandInfo.type) + return type_.GetNoArena(); +} +inline void CommandInfo::set_type(const ::std::string& value) { + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandInfo.type) +} +#if LANG_CXX11 +inline void CommandInfo::set_type(::std::string&& value) { + + type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandInfo.type) +} +#endif +inline void CommandInfo::set_type(const char* value) { + GOOGLE_DCHECK(value != NULL); + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandInfo.type) +} +inline void CommandInfo::set_type(const char* value, size_t size) { + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandInfo.type) +} +inline ::std::string* CommandInfo::mutable_type() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandInfo.type) + return type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandInfo::release_type() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandInfo.type) + + return type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandInfo::set_allocated_type(::std::string* type) { + if (type != NULL) { + + } else { + + } + type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandInfo.type) +} + +// string name = 2; +inline void CommandInfo::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandInfo::name() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandInfo.name) + return name_.GetNoArena(); +} +inline void CommandInfo::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandInfo.name) +} +#if LANG_CXX11 +inline void CommandInfo::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandInfo.name) +} +#endif +inline void CommandInfo::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandInfo.name) +} +inline void CommandInfo::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandInfo.name) +} +inline ::std::string* CommandInfo::mutable_name() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandInfo.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandInfo::release_name() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandInfo.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandInfo::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandInfo.name) +} + +// .configserver.proto.v2.ConfigStatus status = 3; +inline void CommandInfo::clear_status() { + status_ = 0; +} +inline ::configserver::proto::v2::ConfigStatus CommandInfo::status() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandInfo.status) + return static_cast< ::configserver::proto::v2::ConfigStatus >(status_); +} +inline void CommandInfo::set_status(::configserver::proto::v2::ConfigStatus value) { + + status_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandInfo.status) +} + +// string message = 4; +inline void CommandInfo::clear_message() { + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandInfo::message() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandInfo.message) + return message_.GetNoArena(); +} +inline void CommandInfo::set_message(const ::std::string& value) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandInfo.message) +} +#if LANG_CXX11 +inline void CommandInfo::set_message(::std::string&& value) { + + message_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandInfo.message) +} +#endif +inline void CommandInfo::set_message(const char* value) { + GOOGLE_DCHECK(value != NULL); + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandInfo.message) +} +inline void CommandInfo::set_message(const char* value, size_t size) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandInfo.message) +} +inline ::std::string* CommandInfo::mutable_message() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandInfo.message) + return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandInfo::release_message() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandInfo.message) + + return message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandInfo::set_allocated_message(::std::string* message) { + if (message != NULL) { + + } else { + + } + message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandInfo.message) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AgentAttributes + +// bytes version = 1; +inline void AgentAttributes::clear_version() { + version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& AgentAttributes::version() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.AgentAttributes.version) + return version_.GetNoArena(); +} +inline void AgentAttributes::set_version(const ::std::string& value) { + + version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.AgentAttributes.version) +} +#if LANG_CXX11 +inline void AgentAttributes::set_version(::std::string&& value) { + + version_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.AgentAttributes.version) +} +#endif +inline void AgentAttributes::set_version(const char* value) { + GOOGLE_DCHECK(value != NULL); + + version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.AgentAttributes.version) +} +inline void AgentAttributes::set_version(const void* value, size_t size) { + + version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.AgentAttributes.version) +} +inline ::std::string* AgentAttributes::mutable_version() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.AgentAttributes.version) + return version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AgentAttributes::release_version() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.AgentAttributes.version) + + return version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AgentAttributes::set_allocated_version(::std::string* version) { + if (version != NULL) { + + } else { + + } + version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), version); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.AgentAttributes.version) +} + +// bytes ip = 2; +inline void AgentAttributes::clear_ip() { + ip_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& AgentAttributes::ip() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.AgentAttributes.ip) + return ip_.GetNoArena(); +} +inline void AgentAttributes::set_ip(const ::std::string& value) { + + ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.AgentAttributes.ip) +} +#if LANG_CXX11 +inline void AgentAttributes::set_ip(::std::string&& value) { + + ip_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.AgentAttributes.ip) +} +#endif +inline void AgentAttributes::set_ip(const char* value) { + GOOGLE_DCHECK(value != NULL); + + ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.AgentAttributes.ip) +} +inline void AgentAttributes::set_ip(const void* value, size_t size) { + + ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.AgentAttributes.ip) +} +inline ::std::string* AgentAttributes::mutable_ip() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.AgentAttributes.ip) + return ip_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AgentAttributes::release_ip() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.AgentAttributes.ip) + + return ip_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AgentAttributes::set_allocated_ip(::std::string* ip) { + if (ip != NULL) { + + } else { + + } + ip_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ip); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.AgentAttributes.ip) +} + +// bytes hostname = 3; +inline void AgentAttributes::clear_hostname() { + hostname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& AgentAttributes::hostname() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.AgentAttributes.hostname) + return hostname_.GetNoArena(); +} +inline void AgentAttributes::set_hostname(const ::std::string& value) { + + hostname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.AgentAttributes.hostname) +} +#if LANG_CXX11 +inline void AgentAttributes::set_hostname(::std::string&& value) { + + hostname_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.AgentAttributes.hostname) +} +#endif +inline void AgentAttributes::set_hostname(const char* value) { + GOOGLE_DCHECK(value != NULL); + + hostname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.AgentAttributes.hostname) +} +inline void AgentAttributes::set_hostname(const void* value, size_t size) { + + hostname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.AgentAttributes.hostname) +} +inline ::std::string* AgentAttributes::mutable_hostname() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.AgentAttributes.hostname) + return hostname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AgentAttributes::release_hostname() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.AgentAttributes.hostname) + + return hostname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AgentAttributes::set_allocated_hostname(::std::string* hostname) { + if (hostname != NULL) { + + } else { + + } + hostname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), hostname); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.AgentAttributes.hostname) +} + +// map extras = 100; +inline int AgentAttributes::extras_size() const { + return extras_.size(); +} +inline void AgentAttributes::clear_extras() { + extras_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::std::string >& +AgentAttributes::extras() const { + // @@protoc_insertion_point(field_map:configserver.proto.v2.AgentAttributes.extras) + return extras_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::std::string >* +AgentAttributes::mutable_extras() { + // @@protoc_insertion_point(field_mutable_map:configserver.proto.v2.AgentAttributes.extras) + return extras_.MutableMap(); +} + +// ------------------------------------------------------------------- + +// HeartbeatRequest + +// bytes request_id = 1; +inline void HeartbeatRequest::clear_request_id() { + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatRequest::request_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.request_id) + return request_id_.GetNoArena(); +} +inline void HeartbeatRequest::set_request_id(const ::std::string& value) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.request_id) +} +#if LANG_CXX11 +inline void HeartbeatRequest::set_request_id(::std::string&& value) { + + request_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatRequest.request_id) +} +#endif +inline void HeartbeatRequest::set_request_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatRequest.request_id) +} +inline void HeartbeatRequest::set_request_id(const void* value, size_t size) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatRequest.request_id) +} +inline ::std::string* HeartbeatRequest::mutable_request_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.request_id) + return request_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatRequest::release_request_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.request_id) + + return request_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatRequest::set_allocated_request_id(::std::string* request_id) { + if (request_id != NULL) { + + } else { + + } + request_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.request_id) +} + +// uint64 sequence_num = 2; +inline void HeartbeatRequest::clear_sequence_num() { + sequence_num_ = GOOGLE_ULONGLONG(0); +} +inline ::google::protobuf::uint64 HeartbeatRequest::sequence_num() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.sequence_num) + return sequence_num_; +} +inline void HeartbeatRequest::set_sequence_num(::google::protobuf::uint64 value) { + + sequence_num_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.sequence_num) +} + +// uint64 capabilities = 3; +inline void HeartbeatRequest::clear_capabilities() { + capabilities_ = GOOGLE_ULONGLONG(0); +} +inline ::google::protobuf::uint64 HeartbeatRequest::capabilities() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.capabilities) + return capabilities_; +} +inline void HeartbeatRequest::set_capabilities(::google::protobuf::uint64 value) { + + capabilities_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.capabilities) +} + +// bytes instance_id = 4; +inline void HeartbeatRequest::clear_instance_id() { + instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatRequest::instance_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.instance_id) + return instance_id_.GetNoArena(); +} +inline void HeartbeatRequest::set_instance_id(const ::std::string& value) { + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.instance_id) +} +#if LANG_CXX11 +inline void HeartbeatRequest::set_instance_id(::std::string&& value) { + + instance_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatRequest.instance_id) +} +#endif +inline void HeartbeatRequest::set_instance_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatRequest.instance_id) +} +inline void HeartbeatRequest::set_instance_id(const void* value, size_t size) { + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatRequest.instance_id) +} +inline ::std::string* HeartbeatRequest::mutable_instance_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.instance_id) + return instance_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatRequest::release_instance_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.instance_id) + + return instance_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatRequest::set_allocated_instance_id(::std::string* instance_id) { + if (instance_id != NULL) { + + } else { + + } + instance_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.instance_id) +} + +// string agent_type = 5; +inline void HeartbeatRequest::clear_agent_type() { + agent_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatRequest::agent_type() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.agent_type) + return agent_type_.GetNoArena(); +} +inline void HeartbeatRequest::set_agent_type(const ::std::string& value) { + + agent_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.agent_type) +} +#if LANG_CXX11 +inline void HeartbeatRequest::set_agent_type(::std::string&& value) { + + agent_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatRequest.agent_type) +} +#endif +inline void HeartbeatRequest::set_agent_type(const char* value) { + GOOGLE_DCHECK(value != NULL); + + agent_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatRequest.agent_type) +} +inline void HeartbeatRequest::set_agent_type(const char* value, size_t size) { + + agent_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatRequest.agent_type) +} +inline ::std::string* HeartbeatRequest::mutable_agent_type() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.agent_type) + return agent_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatRequest::release_agent_type() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.agent_type) + + return agent_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatRequest::set_allocated_agent_type(::std::string* agent_type) { + if (agent_type != NULL) { + + } else { + + } + agent_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), agent_type); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.agent_type) +} + +// .configserver.proto.v2.AgentAttributes attributes = 6; +inline bool HeartbeatRequest::has_attributes() const { + return this != internal_default_instance() && attributes_ != NULL; +} +inline void HeartbeatRequest::clear_attributes() { + if (GetArenaNoVirtual() == NULL && attributes_ != NULL) { + delete attributes_; + } + attributes_ = NULL; +} +inline const ::configserver::proto::v2::AgentAttributes& HeartbeatRequest::_internal_attributes() const { + return *attributes_; +} +inline const ::configserver::proto::v2::AgentAttributes& HeartbeatRequest::attributes() const { + const ::configserver::proto::v2::AgentAttributes* p = attributes_; + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.attributes) + return p != NULL ? *p : *reinterpret_cast( + &::configserver::proto::v2::_AgentAttributes_default_instance_); +} +inline ::configserver::proto::v2::AgentAttributes* HeartbeatRequest::release_attributes() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.attributes) + + ::configserver::proto::v2::AgentAttributes* temp = attributes_; + attributes_ = NULL; + return temp; +} +inline ::configserver::proto::v2::AgentAttributes* HeartbeatRequest::mutable_attributes() { + + if (attributes_ == NULL) { + auto* p = CreateMaybeMessage<::configserver::proto::v2::AgentAttributes>(GetArenaNoVirtual()); + attributes_ = p; + } + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.attributes) + return attributes_; +} +inline void HeartbeatRequest::set_allocated_attributes(::configserver::proto::v2::AgentAttributes* attributes) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete attributes_; + } + if (attributes) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + attributes = ::google::protobuf::internal::GetOwnedMessage( + message_arena, attributes, submessage_arena); + } + + } else { + + } + attributes_ = attributes; + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.attributes) +} + +// repeated .configserver.proto.v2.AgentGroupTag tags = 7; +inline int HeartbeatRequest::tags_size() const { + return tags_.size(); +} +inline void HeartbeatRequest::clear_tags() { + tags_.Clear(); +} +inline ::configserver::proto::v2::AgentGroupTag* HeartbeatRequest::mutable_tags(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.tags) + return tags_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::AgentGroupTag >* +HeartbeatRequest::mutable_tags() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatRequest.tags) + return &tags_; +} +inline const ::configserver::proto::v2::AgentGroupTag& HeartbeatRequest::tags(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.tags) + return tags_.Get(index); +} +inline ::configserver::proto::v2::AgentGroupTag* HeartbeatRequest::add_tags() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatRequest.tags) + return tags_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::AgentGroupTag >& +HeartbeatRequest::tags() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatRequest.tags) + return tags_; +} + +// string running_status = 8; +inline void HeartbeatRequest::clear_running_status() { + running_status_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatRequest::running_status() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.running_status) + return running_status_.GetNoArena(); +} +inline void HeartbeatRequest::set_running_status(const ::std::string& value) { + + running_status_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.running_status) +} +#if LANG_CXX11 +inline void HeartbeatRequest::set_running_status(::std::string&& value) { + + running_status_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatRequest.running_status) +} +#endif +inline void HeartbeatRequest::set_running_status(const char* value) { + GOOGLE_DCHECK(value != NULL); + + running_status_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatRequest.running_status) +} +inline void HeartbeatRequest::set_running_status(const char* value, size_t size) { + + running_status_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatRequest.running_status) +} +inline ::std::string* HeartbeatRequest::mutable_running_status() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.running_status) + return running_status_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatRequest::release_running_status() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.running_status) + + return running_status_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatRequest::set_allocated_running_status(::std::string* running_status) { + if (running_status != NULL) { + + } else { + + } + running_status_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), running_status); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.running_status) +} + +// int64 startup_time = 9; +inline void HeartbeatRequest::clear_startup_time() { + startup_time_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 HeartbeatRequest::startup_time() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.startup_time) + return startup_time_; +} +inline void HeartbeatRequest::set_startup_time(::google::protobuf::int64 value) { + + startup_time_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.startup_time) +} + +// repeated .configserver.proto.v2.ConfigInfo pipeline_configs = 10; +inline int HeartbeatRequest::pipeline_configs_size() const { + return pipeline_configs_.size(); +} +inline void HeartbeatRequest::clear_pipeline_configs() { + pipeline_configs_.Clear(); +} +inline ::configserver::proto::v2::ConfigInfo* HeartbeatRequest::mutable_pipeline_configs(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.pipeline_configs) + return pipeline_configs_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* +HeartbeatRequest::mutable_pipeline_configs() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatRequest.pipeline_configs) + return &pipeline_configs_; +} +inline const ::configserver::proto::v2::ConfigInfo& HeartbeatRequest::pipeline_configs(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.pipeline_configs) + return pipeline_configs_.Get(index); +} +inline ::configserver::proto::v2::ConfigInfo* HeartbeatRequest::add_pipeline_configs() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatRequest.pipeline_configs) + return pipeline_configs_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& +HeartbeatRequest::pipeline_configs() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatRequest.pipeline_configs) + return pipeline_configs_; +} + +// repeated .configserver.proto.v2.ConfigInfo process_configs = 11; +inline int HeartbeatRequest::process_configs_size() const { + return process_configs_.size(); +} +inline void HeartbeatRequest::clear_process_configs() { + process_configs_.Clear(); +} +inline ::configserver::proto::v2::ConfigInfo* HeartbeatRequest::mutable_process_configs(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.process_configs) + return process_configs_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* +HeartbeatRequest::mutable_process_configs() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatRequest.process_configs) + return &process_configs_; +} +inline const ::configserver::proto::v2::ConfigInfo& HeartbeatRequest::process_configs(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.process_configs) + return process_configs_.Get(index); +} +inline ::configserver::proto::v2::ConfigInfo* HeartbeatRequest::add_process_configs() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatRequest.process_configs) + return process_configs_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& +HeartbeatRequest::process_configs() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatRequest.process_configs) + return process_configs_; +} + +// repeated .configserver.proto.v2.CommandInfo custom_commands = 12; +inline int HeartbeatRequest::custom_commands_size() const { + return custom_commands_.size(); +} +inline void HeartbeatRequest::clear_custom_commands() { + custom_commands_.Clear(); +} +inline ::configserver::proto::v2::CommandInfo* HeartbeatRequest::mutable_custom_commands(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.custom_commands) + return custom_commands_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandInfo >* +HeartbeatRequest::mutable_custom_commands() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatRequest.custom_commands) + return &custom_commands_; +} +inline const ::configserver::proto::v2::CommandInfo& HeartbeatRequest::custom_commands(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.custom_commands) + return custom_commands_.Get(index); +} +inline ::configserver::proto::v2::CommandInfo* HeartbeatRequest::add_custom_commands() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatRequest.custom_commands) + return custom_commands_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandInfo >& +HeartbeatRequest::custom_commands() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatRequest.custom_commands) + return custom_commands_; +} + +// uint64 flags = 13; +inline void HeartbeatRequest::clear_flags() { + flags_ = GOOGLE_ULONGLONG(0); +} +inline ::google::protobuf::uint64 HeartbeatRequest::flags() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.flags) + return flags_; +} +inline void HeartbeatRequest::set_flags(::google::protobuf::uint64 value) { + + flags_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.flags) +} + +// bytes opaque = 14; +inline void HeartbeatRequest::clear_opaque() { + opaque_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatRequest::opaque() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatRequest.opaque) + return opaque_.GetNoArena(); +} +inline void HeartbeatRequest::set_opaque(const ::std::string& value) { + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatRequest.opaque) +} +#if LANG_CXX11 +inline void HeartbeatRequest::set_opaque(::std::string&& value) { + + opaque_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatRequest.opaque) +} +#endif +inline void HeartbeatRequest::set_opaque(const char* value) { + GOOGLE_DCHECK(value != NULL); + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatRequest.opaque) +} +inline void HeartbeatRequest::set_opaque(const void* value, size_t size) { + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatRequest.opaque) +} +inline ::std::string* HeartbeatRequest::mutable_opaque() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatRequest.opaque) + return opaque_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatRequest::release_opaque() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatRequest.opaque) + + return opaque_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatRequest::set_allocated_opaque(::std::string* opaque) { + if (opaque != NULL) { + + } else { + + } + opaque_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), opaque); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatRequest.opaque) +} + +// ------------------------------------------------------------------- + +// ConfigDetail + +// string name = 1; +inline void ConfigDetail::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ConfigDetail::name() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigDetail.name) + return name_.GetNoArena(); +} +inline void ConfigDetail::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigDetail.name) +} +#if LANG_CXX11 +inline void ConfigDetail::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.ConfigDetail.name) +} +#endif +inline void ConfigDetail::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.ConfigDetail.name) +} +inline void ConfigDetail::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.ConfigDetail.name) +} +inline ::std::string* ConfigDetail::mutable_name() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.ConfigDetail.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ConfigDetail::release_name() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.ConfigDetail.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ConfigDetail::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.ConfigDetail.name) +} + +// int64 version = 2; +inline void ConfigDetail::clear_version() { + version_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 ConfigDetail::version() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigDetail.version) + return version_; +} +inline void ConfigDetail::set_version(::google::protobuf::int64 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigDetail.version) +} + +// bytes detail = 3; +inline void ConfigDetail::clear_detail() { + detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ConfigDetail::detail() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ConfigDetail.detail) + return detail_.GetNoArena(); +} +inline void ConfigDetail::set_detail(const ::std::string& value) { + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.ConfigDetail.detail) +} +#if LANG_CXX11 +inline void ConfigDetail::set_detail(::std::string&& value) { + + detail_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.ConfigDetail.detail) +} +#endif +inline void ConfigDetail::set_detail(const char* value) { + GOOGLE_DCHECK(value != NULL); + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.ConfigDetail.detail) +} +inline void ConfigDetail::set_detail(const void* value, size_t size) { + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.ConfigDetail.detail) +} +inline ::std::string* ConfigDetail::mutable_detail() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.ConfigDetail.detail) + return detail_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ConfigDetail::release_detail() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.ConfigDetail.detail) + + return detail_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ConfigDetail::set_allocated_detail(::std::string* detail) { + if (detail != NULL) { + + } else { + + } + detail_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), detail); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.ConfigDetail.detail) +} + +// ------------------------------------------------------------------- + +// CommandDetail + +// string type = 1; +inline void CommandDetail::clear_type() { + type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandDetail::type() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandDetail.type) + return type_.GetNoArena(); +} +inline void CommandDetail::set_type(const ::std::string& value) { + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandDetail.type) +} +#if LANG_CXX11 +inline void CommandDetail::set_type(::std::string&& value) { + + type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandDetail.type) +} +#endif +inline void CommandDetail::set_type(const char* value) { + GOOGLE_DCHECK(value != NULL); + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandDetail.type) +} +inline void CommandDetail::set_type(const char* value, size_t size) { + + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandDetail.type) +} +inline ::std::string* CommandDetail::mutable_type() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandDetail.type) + return type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandDetail::release_type() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandDetail.type) + + return type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandDetail::set_allocated_type(::std::string* type) { + if (type != NULL) { + + } else { + + } + type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandDetail.type) +} + +// string name = 2; +inline void CommandDetail::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandDetail::name() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandDetail.name) + return name_.GetNoArena(); +} +inline void CommandDetail::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandDetail.name) +} +#if LANG_CXX11 +inline void CommandDetail::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandDetail.name) +} +#endif +inline void CommandDetail::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandDetail.name) +} +inline void CommandDetail::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandDetail.name) +} +inline ::std::string* CommandDetail::mutable_name() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandDetail.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandDetail::release_name() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandDetail.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandDetail::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandDetail.name) +} + +// bytes detail = 3; +inline void CommandDetail::clear_detail() { + detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& CommandDetail::detail() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandDetail.detail) + return detail_.GetNoArena(); +} +inline void CommandDetail::set_detail(const ::std::string& value) { + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandDetail.detail) +} +#if LANG_CXX11 +inline void CommandDetail::set_detail(::std::string&& value) { + + detail_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.CommandDetail.detail) +} +#endif +inline void CommandDetail::set_detail(const char* value) { + GOOGLE_DCHECK(value != NULL); + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.CommandDetail.detail) +} +inline void CommandDetail::set_detail(const void* value, size_t size) { + + detail_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.CommandDetail.detail) +} +inline ::std::string* CommandDetail::mutable_detail() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.CommandDetail.detail) + return detail_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* CommandDetail::release_detail() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.CommandDetail.detail) + + return detail_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void CommandDetail::set_allocated_detail(::std::string* detail) { + if (detail != NULL) { + + } else { + + } + detail_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), detail); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.CommandDetail.detail) +} + +// int64 expire_time = 4; +inline void CommandDetail::clear_expire_time() { + expire_time_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 CommandDetail::expire_time() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.CommandDetail.expire_time) + return expire_time_; +} +inline void CommandDetail::set_expire_time(::google::protobuf::int64 value) { + + expire_time_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.CommandDetail.expire_time) +} + +// ------------------------------------------------------------------- + +// ServerErrorResponse + +// int32 error_code = 1; +inline void ServerErrorResponse::clear_error_code() { + error_code_ = 0; +} +inline ::google::protobuf::int32 ServerErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ServerErrorResponse.error_code) + return error_code_; +} +inline void ServerErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.ServerErrorResponse.error_code) +} + +// string error_message = 2; +inline void ServerErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ServerErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.ServerErrorResponse.error_message) + return error_message_.GetNoArena(); +} +inline void ServerErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.ServerErrorResponse.error_message) +} +#if LANG_CXX11 +inline void ServerErrorResponse::set_error_message(::std::string&& value) { + + error_message_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.ServerErrorResponse.error_message) +} +#endif +inline void ServerErrorResponse::set_error_message(const char* value) { + GOOGLE_DCHECK(value != NULL); + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.ServerErrorResponse.error_message) +} +inline void ServerErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.ServerErrorResponse.error_message) +} +inline ::std::string* ServerErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.ServerErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerErrorResponse::release_error_message() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.ServerErrorResponse.error_message) + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.ServerErrorResponse.error_message) +} + +// ------------------------------------------------------------------- + +// HeartbeatResponse + +// bytes request_id = 1; +inline void HeartbeatResponse::clear_request_id() { + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatResponse::request_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.request_id) + return request_id_.GetNoArena(); +} +inline void HeartbeatResponse::set_request_id(const ::std::string& value) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatResponse.request_id) +} +#if LANG_CXX11 +inline void HeartbeatResponse::set_request_id(::std::string&& value) { + + request_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatResponse.request_id) +} +#endif +inline void HeartbeatResponse::set_request_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatResponse.request_id) +} +inline void HeartbeatResponse::set_request_id(const void* value, size_t size) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatResponse.request_id) +} +inline ::std::string* HeartbeatResponse::mutable_request_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.request_id) + return request_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatResponse::release_request_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatResponse.request_id) + + return request_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatResponse::set_allocated_request_id(::std::string* request_id) { + if (request_id != NULL) { + + } else { + + } + request_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatResponse.request_id) +} + +// .configserver.proto.v2.ServerErrorResponse error_response = 2; +inline bool HeartbeatResponse::has_error_response() const { + return this != internal_default_instance() && error_response_ != NULL; +} +inline void HeartbeatResponse::clear_error_response() { + if (GetArenaNoVirtual() == NULL && error_response_ != NULL) { + delete error_response_; + } + error_response_ = NULL; +} +inline const ::configserver::proto::v2::ServerErrorResponse& HeartbeatResponse::_internal_error_response() const { + return *error_response_; +} +inline const ::configserver::proto::v2::ServerErrorResponse& HeartbeatResponse::error_response() const { + const ::configserver::proto::v2::ServerErrorResponse* p = error_response_; + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.error_response) + return p != NULL ? *p : *reinterpret_cast( + &::configserver::proto::v2::_ServerErrorResponse_default_instance_); +} +inline ::configserver::proto::v2::ServerErrorResponse* HeartbeatResponse::release_error_response() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatResponse.error_response) + + ::configserver::proto::v2::ServerErrorResponse* temp = error_response_; + error_response_ = NULL; + return temp; +} +inline ::configserver::proto::v2::ServerErrorResponse* HeartbeatResponse::mutable_error_response() { + + if (error_response_ == NULL) { + auto* p = CreateMaybeMessage<::configserver::proto::v2::ServerErrorResponse>(GetArenaNoVirtual()); + error_response_ = p; + } + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.error_response) + return error_response_; +} +inline void HeartbeatResponse::set_allocated_error_response(::configserver::proto::v2::ServerErrorResponse* error_response) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete error_response_; + } + if (error_response) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + error_response = ::google::protobuf::internal::GetOwnedMessage( + message_arena, error_response, submessage_arena); + } + + } else { + + } + error_response_ = error_response; + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatResponse.error_response) +} + +// uint64 capabilities = 3; +inline void HeartbeatResponse::clear_capabilities() { + capabilities_ = GOOGLE_ULONGLONG(0); +} +inline ::google::protobuf::uint64 HeartbeatResponse::capabilities() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.capabilities) + return capabilities_; +} +inline void HeartbeatResponse::set_capabilities(::google::protobuf::uint64 value) { + + capabilities_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatResponse.capabilities) +} + +// repeated .configserver.proto.v2.ConfigDetail pipeline_config_updates = 4; +inline int HeartbeatResponse::pipeline_config_updates_size() const { + return pipeline_config_updates_.size(); +} +inline void HeartbeatResponse::clear_pipeline_config_updates() { + pipeline_config_updates_.Clear(); +} +inline ::configserver::proto::v2::ConfigDetail* HeartbeatResponse::mutable_pipeline_config_updates(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.pipeline_config_updates) + return pipeline_config_updates_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* +HeartbeatResponse::mutable_pipeline_config_updates() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatResponse.pipeline_config_updates) + return &pipeline_config_updates_; +} +inline const ::configserver::proto::v2::ConfigDetail& HeartbeatResponse::pipeline_config_updates(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.pipeline_config_updates) + return pipeline_config_updates_.Get(index); +} +inline ::configserver::proto::v2::ConfigDetail* HeartbeatResponse::add_pipeline_config_updates() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatResponse.pipeline_config_updates) + return pipeline_config_updates_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& +HeartbeatResponse::pipeline_config_updates() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatResponse.pipeline_config_updates) + return pipeline_config_updates_; +} + +// repeated .configserver.proto.v2.ConfigDetail process_config_updates = 5; +inline int HeartbeatResponse::process_config_updates_size() const { + return process_config_updates_.size(); +} +inline void HeartbeatResponse::clear_process_config_updates() { + process_config_updates_.Clear(); +} +inline ::configserver::proto::v2::ConfigDetail* HeartbeatResponse::mutable_process_config_updates(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.process_config_updates) + return process_config_updates_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* +HeartbeatResponse::mutable_process_config_updates() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatResponse.process_config_updates) + return &process_config_updates_; +} +inline const ::configserver::proto::v2::ConfigDetail& HeartbeatResponse::process_config_updates(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.process_config_updates) + return process_config_updates_.Get(index); +} +inline ::configserver::proto::v2::ConfigDetail* HeartbeatResponse::add_process_config_updates() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatResponse.process_config_updates) + return process_config_updates_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& +HeartbeatResponse::process_config_updates() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatResponse.process_config_updates) + return process_config_updates_; +} + +// repeated .configserver.proto.v2.CommandDetail custom_command_updates = 6; +inline int HeartbeatResponse::custom_command_updates_size() const { + return custom_command_updates_.size(); +} +inline void HeartbeatResponse::clear_custom_command_updates() { + custom_command_updates_.Clear(); +} +inline ::configserver::proto::v2::CommandDetail* HeartbeatResponse::mutable_custom_command_updates(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.custom_command_updates) + return custom_command_updates_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandDetail >* +HeartbeatResponse::mutable_custom_command_updates() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.HeartbeatResponse.custom_command_updates) + return &custom_command_updates_; +} +inline const ::configserver::proto::v2::CommandDetail& HeartbeatResponse::custom_command_updates(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.custom_command_updates) + return custom_command_updates_.Get(index); +} +inline ::configserver::proto::v2::CommandDetail* HeartbeatResponse::add_custom_command_updates() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.HeartbeatResponse.custom_command_updates) + return custom_command_updates_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::CommandDetail >& +HeartbeatResponse::custom_command_updates() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.HeartbeatResponse.custom_command_updates) + return custom_command_updates_; +} + +// uint64 flags = 7; +inline void HeartbeatResponse::clear_flags() { + flags_ = GOOGLE_ULONGLONG(0); +} +inline ::google::protobuf::uint64 HeartbeatResponse::flags() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.flags) + return flags_; +} +inline void HeartbeatResponse::set_flags(::google::protobuf::uint64 value) { + + flags_ = value; + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatResponse.flags) +} + +// bytes opaque = 8; +inline void HeartbeatResponse::clear_opaque() { + opaque_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& HeartbeatResponse::opaque() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.HeartbeatResponse.opaque) + return opaque_.GetNoArena(); +} +inline void HeartbeatResponse::set_opaque(const ::std::string& value) { + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.HeartbeatResponse.opaque) +} +#if LANG_CXX11 +inline void HeartbeatResponse::set_opaque(::std::string&& value) { + + opaque_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.HeartbeatResponse.opaque) +} +#endif +inline void HeartbeatResponse::set_opaque(const char* value) { + GOOGLE_DCHECK(value != NULL); + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.HeartbeatResponse.opaque) +} +inline void HeartbeatResponse::set_opaque(const void* value, size_t size) { + + opaque_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.HeartbeatResponse.opaque) +} +inline ::std::string* HeartbeatResponse::mutable_opaque() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.HeartbeatResponse.opaque) + return opaque_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* HeartbeatResponse::release_opaque() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.HeartbeatResponse.opaque) + + return opaque_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void HeartbeatResponse::set_allocated_opaque(::std::string* opaque) { + if (opaque != NULL) { + + } else { + + } + opaque_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), opaque); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.HeartbeatResponse.opaque) +} + +// ------------------------------------------------------------------- + +// FetchConfigRequest + +// bytes request_id = 1; +inline void FetchConfigRequest::clear_request_id() { + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FetchConfigRequest::request_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigRequest.request_id) + return request_id_.GetNoArena(); +} +inline void FetchConfigRequest::set_request_id(const ::std::string& value) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.FetchConfigRequest.request_id) +} +#if LANG_CXX11 +inline void FetchConfigRequest::set_request_id(::std::string&& value) { + + request_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.FetchConfigRequest.request_id) +} +#endif +inline void FetchConfigRequest::set_request_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.FetchConfigRequest.request_id) +} +inline void FetchConfigRequest::set_request_id(const void* value, size_t size) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.FetchConfigRequest.request_id) +} +inline ::std::string* FetchConfigRequest::mutable_request_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigRequest.request_id) + return request_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* FetchConfigRequest::release_request_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.FetchConfigRequest.request_id) + + return request_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FetchConfigRequest::set_allocated_request_id(::std::string* request_id) { + if (request_id != NULL) { + + } else { + + } + request_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.FetchConfigRequest.request_id) +} + +// bytes instance_id = 2; +inline void FetchConfigRequest::clear_instance_id() { + instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FetchConfigRequest::instance_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigRequest.instance_id) + return instance_id_.GetNoArena(); +} +inline void FetchConfigRequest::set_instance_id(const ::std::string& value) { + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.FetchConfigRequest.instance_id) +} +#if LANG_CXX11 +inline void FetchConfigRequest::set_instance_id(::std::string&& value) { + + instance_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.FetchConfigRequest.instance_id) +} +#endif +inline void FetchConfigRequest::set_instance_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.FetchConfigRequest.instance_id) +} +inline void FetchConfigRequest::set_instance_id(const void* value, size_t size) { + + instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.FetchConfigRequest.instance_id) +} +inline ::std::string* FetchConfigRequest::mutable_instance_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigRequest.instance_id) + return instance_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* FetchConfigRequest::release_instance_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.FetchConfigRequest.instance_id) + + return instance_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FetchConfigRequest::set_allocated_instance_id(::std::string* instance_id) { + if (instance_id != NULL) { + + } else { + + } + instance_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.FetchConfigRequest.instance_id) +} + +// repeated .configserver.proto.v2.ConfigInfo req_configs = 3; +inline int FetchConfigRequest::req_configs_size() const { + return req_configs_.size(); +} +inline void FetchConfigRequest::clear_req_configs() { + req_configs_.Clear(); +} +inline ::configserver::proto::v2::ConfigInfo* FetchConfigRequest::mutable_req_configs(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigRequest.req_configs) + return req_configs_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >* +FetchConfigRequest::mutable_req_configs() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.FetchConfigRequest.req_configs) + return &req_configs_; +} +inline const ::configserver::proto::v2::ConfigInfo& FetchConfigRequest::req_configs(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigRequest.req_configs) + return req_configs_.Get(index); +} +inline ::configserver::proto::v2::ConfigInfo* FetchConfigRequest::add_req_configs() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.FetchConfigRequest.req_configs) + return req_configs_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigInfo >& +FetchConfigRequest::req_configs() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.FetchConfigRequest.req_configs) + return req_configs_; +} + +// ------------------------------------------------------------------- + +// FetchConfigResponse + +// bytes request_id = 1; +inline void FetchConfigResponse::clear_request_id() { + request_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FetchConfigResponse::request_id() const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigResponse.request_id) + return request_id_.GetNoArena(); +} +inline void FetchConfigResponse::set_request_id(const ::std::string& value) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:configserver.proto.v2.FetchConfigResponse.request_id) +} +#if LANG_CXX11 +inline void FetchConfigResponse::set_request_id(::std::string&& value) { + + request_id_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:configserver.proto.v2.FetchConfigResponse.request_id) +} +#endif +inline void FetchConfigResponse::set_request_id(const char* value) { + GOOGLE_DCHECK(value != NULL); + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:configserver.proto.v2.FetchConfigResponse.request_id) +} +inline void FetchConfigResponse::set_request_id(const void* value, size_t size) { + + request_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:configserver.proto.v2.FetchConfigResponse.request_id) +} +inline ::std::string* FetchConfigResponse::mutable_request_id() { + + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigResponse.request_id) + return request_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* FetchConfigResponse::release_request_id() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.FetchConfigResponse.request_id) + + return request_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FetchConfigResponse::set_allocated_request_id(::std::string* request_id) { + if (request_id != NULL) { + + } else { + + } + request_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_id); + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.FetchConfigResponse.request_id) +} + +// .configserver.proto.v2.ServerErrorResponse error_response = 2; +inline bool FetchConfigResponse::has_error_response() const { + return this != internal_default_instance() && error_response_ != NULL; +} +inline void FetchConfigResponse::clear_error_response() { + if (GetArenaNoVirtual() == NULL && error_response_ != NULL) { + delete error_response_; + } + error_response_ = NULL; +} +inline const ::configserver::proto::v2::ServerErrorResponse& FetchConfigResponse::_internal_error_response() const { + return *error_response_; +} +inline const ::configserver::proto::v2::ServerErrorResponse& FetchConfigResponse::error_response() const { + const ::configserver::proto::v2::ServerErrorResponse* p = error_response_; + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigResponse.error_response) + return p != NULL ? *p : *reinterpret_cast( + &::configserver::proto::v2::_ServerErrorResponse_default_instance_); +} +inline ::configserver::proto::v2::ServerErrorResponse* FetchConfigResponse::release_error_response() { + // @@protoc_insertion_point(field_release:configserver.proto.v2.FetchConfigResponse.error_response) + + ::configserver::proto::v2::ServerErrorResponse* temp = error_response_; + error_response_ = NULL; + return temp; +} +inline ::configserver::proto::v2::ServerErrorResponse* FetchConfigResponse::mutable_error_response() { + + if (error_response_ == NULL) { + auto* p = CreateMaybeMessage<::configserver::proto::v2::ServerErrorResponse>(GetArenaNoVirtual()); + error_response_ = p; + } + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigResponse.error_response) + return error_response_; +} +inline void FetchConfigResponse::set_allocated_error_response(::configserver::proto::v2::ServerErrorResponse* error_response) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete error_response_; + } + if (error_response) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + error_response = ::google::protobuf::internal::GetOwnedMessage( + message_arena, error_response, submessage_arena); + } + + } else { + + } + error_response_ = error_response; + // @@protoc_insertion_point(field_set_allocated:configserver.proto.v2.FetchConfigResponse.error_response) +} + +// repeated .configserver.proto.v2.ConfigDetail config_details = 3; +inline int FetchConfigResponse::config_details_size() const { + return config_details_.size(); +} +inline void FetchConfigResponse::clear_config_details() { + config_details_.Clear(); +} +inline ::configserver::proto::v2::ConfigDetail* FetchConfigResponse::mutable_config_details(int index) { + // @@protoc_insertion_point(field_mutable:configserver.proto.v2.FetchConfigResponse.config_details) + return config_details_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >* +FetchConfigResponse::mutable_config_details() { + // @@protoc_insertion_point(field_mutable_list:configserver.proto.v2.FetchConfigResponse.config_details) + return &config_details_; +} +inline const ::configserver::proto::v2::ConfigDetail& FetchConfigResponse::config_details(int index) const { + // @@protoc_insertion_point(field_get:configserver.proto.v2.FetchConfigResponse.config_details) + return config_details_.Get(index); +} +inline ::configserver::proto::v2::ConfigDetail* FetchConfigResponse::add_config_details() { + // @@protoc_insertion_point(field_add:configserver.proto.v2.FetchConfigResponse.config_details) + return config_details_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::configserver::proto::v2::ConfigDetail >& +FetchConfigResponse::config_details() const { + // @@protoc_insertion_point(field_list:configserver.proto.v2.FetchConfigResponse.config_details) + return config_details_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v2 +} // namespace proto +} // namespace configserver + +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::configserver::proto::v2::ConfigStatus> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::v2::ConfigStatus>() { + return ::configserver::proto::v2::ConfigStatus_descriptor(); +} +template <> struct is_proto_enum< ::configserver::proto::v2::AgentCapabilities> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::v2::AgentCapabilities>() { + return ::configserver::proto::v2::AgentCapabilities_descriptor(); +} +template <> struct is_proto_enum< ::configserver::proto::v2::RequestFlags> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::v2::RequestFlags>() { + return ::configserver::proto::v2::RequestFlags_descriptor(); +} +template <> struct is_proto_enum< ::configserver::proto::v2::ServerCapabilities> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::v2::ServerCapabilities>() { + return ::configserver::proto::v2::ServerCapabilities_descriptor(); +} +template <> struct is_proto_enum< ::configserver::proto::v2::ResponseFlags> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::configserver::proto::v2::ResponseFlags>() { + return ::configserver::proto::v2::ResponseFlags_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_INCLUDED_v2_2fagent_2eproto diff --git a/core/controller/EventDispatcher.cpp b/core/controller/EventDispatcher.cpp index e2b3e94846..7298f3bf62 100644 --- a/core/controller/EventDispatcher.cpp +++ b/core/controller/EventDispatcher.cpp @@ -59,7 +59,7 @@ #include "application/Application.h" #include "config_manager/ConfigManager.h" #include "go_pipeline/LogtailPlugin.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "plugin/PluginRegistry.h" #include "file_server/FileServer.h" #include "input/InputContainerStdio.h" @@ -402,7 +402,7 @@ void EventDispatcher::AddExistedFileEvents(const char* path, int wd) { EventDispatcher::ValidateCheckpointResult EventDispatcher::validateCheckpoint( CheckPointPtr& checkpoint, map& cachePathDevInodeMap, vector& eventVec) { - shared_ptr config = PipelineManager::GetInstance()->FindPipelineByName(checkpoint->mConfigName); + shared_ptr config = PipelineManager::GetInstance()->FindConfigByName(checkpoint->mConfigName); if (config == NULL) { LOG_INFO(sLogger, ("delete checkpoint", "the corresponding config is deleted")("config", checkpoint->mConfigName)( diff --git a/core/go_pipeline/LogtailPlugin.cpp b/core/go_pipeline/LogtailPlugin.cpp index decff47717..0380549cc5 100644 --- a/core/go_pipeline/LogtailPlugin.cpp +++ b/core/go_pipeline/LogtailPlugin.cpp @@ -27,7 +27,7 @@ #include "logger/Logger.h" #include "monitor/LogFileProfiler.h" #include "monitor/LogtailAlarm.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "profile_sender/ProfileSender.h" #include "sender/Sender.h" @@ -181,7 +181,7 @@ int LogtailPlugin::SendPbV2(const char* configName, return 0; } } else { - shared_ptr p = PipelineManager::GetInstance()->FindPipelineByName(configNameStr); + shared_ptr p = PipelineManager::GetInstance()->FindConfigByName(configNameStr); if (!p) { LOG_INFO(sLogger, ("error", "SendPbV2 can not find config, maybe config updated")("config", configNameStr)( diff --git a/core/input/InputFile.cpp b/core/input/InputFile.cpp index 51ed6819f6..24ede1c043 100644 --- a/core/input/InputFile.cpp +++ b/core/input/InputFile.cpp @@ -24,7 +24,7 @@ #include "config_manager/ConfigManager.h" #include "file_server/FileServer.h" #include "pipeline/Pipeline.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "plugin/PluginRegistry.h" #include "processor/inner/ProcessorSplitLogStringNative.h" #include "processor/inner/ProcessorSplitMultilineLogStringNative.h" diff --git a/core/input/InputStaticFile.cpp b/core/input/InputStaticFile.cpp index f392e8c221..9d943fff76 100644 --- a/core/input/InputStaticFile.cpp +++ b/core/input/InputStaticFile.cpp @@ -24,7 +24,7 @@ InputStaticFile::InputStaticFile(/* args */) { InputStaticFile::~InputStaticFile() { } -void InputStaticFile::Init(Config &&config) { +void InputStaticFile::Init(PipelineConfig &&config) { // mAdhocFileManager = AdhocFileManager::GetInstance(); // GetStaticFileList(); } diff --git a/core/input/InputStaticFile.h b/core/input/InputStaticFile.h index ce2373ffcf..eec8caef4c 100644 --- a/core/input/InputStaticFile.h +++ b/core/input/InputStaticFile.h @@ -15,7 +15,7 @@ */ #pragma once -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "file_server/AdhocFileManager.h" namespace logtail { @@ -33,7 +33,7 @@ class InputStaticFile { InputStaticFile(/* args */); ~InputStaticFile(); - void Init(Config &&config); + void Init(PipelineConfig &&config); void Start(); void Stop(bool isRemoving); }; diff --git a/core/input/links.cmake b/core/input/links.cmake index da1585864e..0e04cbffe1 100644 --- a/core/input/links.cmake +++ b/core/input/links.cmake @@ -16,4 +16,4 @@ macro(input_link target_name) # link external libraries -endmacro() \ No newline at end of file +endmacro() diff --git a/core/monitor/Monitor.cpp b/core/monitor/Monitor.cpp index 373cc4926f..f87943a40a 100644 --- a/core/monitor/Monitor.cpp +++ b/core/monitor/Monitor.cpp @@ -48,7 +48,7 @@ #ifdef __ENTERPRISE__ #include "config/provider/EnterpriseConfigProvider.h" #endif -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" using namespace std; using namespace sls_logs; diff --git a/core/pipeline/Pipeline.cpp b/core/pipeline/Pipeline.cpp index 7c1090af64..771bb6134c 100644 --- a/core/pipeline/Pipeline.cpp +++ b/core/pipeline/Pipeline.cpp @@ -45,7 +45,7 @@ void AddExtendedGlobalParamToGoPipeline(const Json::Value& extendedParams, Json: } } -bool Pipeline::Init(Config&& config) { +bool Pipeline::Init(PipelineConfig&& config) { mName = config.mName; mConfig = std::move(config.mDetail); mContext.SetConfigName(mName); diff --git a/core/pipeline/Pipeline.h b/core/pipeline/Pipeline.h index 0eac89ed93..28eea17b9a 100644 --- a/core/pipeline/Pipeline.h +++ b/core/pipeline/Pipeline.h @@ -23,7 +23,7 @@ #include #include -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "input/InputContainerStdio.h" #include "input/InputFile.h" #include "models/PipelineEventGroup.h" @@ -37,7 +37,7 @@ namespace logtail { class Pipeline { public: // copy/move control functions are deleted because of mContext - bool Init(Config&& config); + bool Init(PipelineConfig&& config); void Start(); void Stop(bool isRemoving); void Process(std::vector& logGroupList, size_t inputIndex); diff --git a/core/pipeline/PipelineManager.cpp b/core/pipeline/PipelineConfigManager.cpp similarity index 91% rename from core/pipeline/PipelineManager.cpp rename to core/pipeline/PipelineConfigManager.cpp index 1ec55fdece..5d2f2ccbe0 100644 --- a/core/pipeline/PipelineManager.cpp +++ b/core/pipeline/PipelineConfigManager.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "config_manager/ConfigManager.h" #include "file_server/FileServer.h" @@ -29,6 +29,7 @@ #include "shennong/ShennongManager.h" #include "streamlog/StreamLogManager.h" #endif +#include "config/feedbacker/ConfigFeedbackReceiver.h" #include "queue/ProcessQueueManager.h" #include "queue/QueueKeyManager.h" @@ -36,7 +37,7 @@ using namespace std; namespace logtail { -void logtail::PipelineManager::UpdatePipelines(ConfigDiff& diff) { +void logtail::PipelineManager::UpdatePipelines(PipelineConfigDiff& diff) { #ifndef APSARA_UNIT_TEST_MAIN // 过渡使用 static bool isFileServerStarted = false, isInputObserverStarted = false; @@ -93,6 +94,7 @@ void logtail::PipelineManager::UpdatePipelines(ConfigDiff& diff) { DecreasePluginUsageCnt(iter->second->GetPluginStatistics()); iter->second->RemoveProcessQueue(); mPipelineNameEntityMap.erase(iter); + ConfigFeedbackReceiver::GetInstance().FeedbackPipelineConfigStatus(name, ConfigFeedbackStatus::DELETED); } for (auto& config : diff.mModified) { auto p = BuildPipeline(std::move(config)); @@ -107,8 +109,10 @@ void logtail::PipelineManager::UpdatePipelines(ConfigDiff& diff) { config.mLogstore, config.mRegion); diff.mUnchanged.push_back(config.mName); + ConfigFeedbackReceiver::GetInstance().FeedbackPipelineConfigStatus(config.mName, ConfigFeedbackStatus::FAILED); continue; } + ConfigFeedbackReceiver::GetInstance().FeedbackPipelineConfigStatus(config.mName, ConfigFeedbackStatus::APPLIED); LOG_INFO(sLogger, ("pipeline building for existing config succeeded", "stop the old pipeline and start the new one")("config", config.mName)); @@ -131,10 +135,12 @@ void logtail::PipelineManager::UpdatePipelines(ConfigDiff& diff) { config.mProject, config.mLogstore, config.mRegion); + ConfigFeedbackReceiver::GetInstance().FeedbackPipelineConfigStatus(config.mName, ConfigFeedbackStatus::FAILED); continue; } LOG_INFO(sLogger, ("pipeline building for new config succeeded", "begin to start pipeline")("config", config.mName)); + ConfigFeedbackReceiver::GetInstance().FeedbackPipelineConfigStatus(config.mName, ConfigFeedbackStatus::APPLIED); mPipelineNameEntityMap[config.mName] = p; IncreasePluginUsageCnt(p->GetPluginStatistics()); p->Start(); @@ -189,7 +195,7 @@ void logtail::PipelineManager::UpdatePipelines(ConfigDiff& diff) { #endif } -shared_ptr PipelineManager::FindPipelineByName(const string& configName) const { +shared_ptr PipelineManager::FindConfigByName(const string& configName) const { auto it = mPipelineNameEntityMap.find(configName); if (it != mPipelineNameEntityMap.end()) { return it->second; @@ -197,7 +203,7 @@ shared_ptr PipelineManager::FindPipelineByName(const string& configNam return nullptr; } -vector PipelineManager::GetAllPipelineNames() const { +vector PipelineManager::GetAllConfigNames() const { vector res; for (const auto& item : mPipelineNameEntityMap) { res.push_back(item.first); @@ -248,7 +254,7 @@ void PipelineManager::StopAllPipelines() { LOG_INFO(sLogger, ("stop all pipelines", "succeeded")); } -shared_ptr PipelineManager::BuildPipeline(Config&& config) { +shared_ptr PipelineManager::BuildPipeline(PipelineConfig&& config) { shared_ptr p = make_shared(); // only config.mDetail is removed, other members can be safely used later if (!p->Init(std::move(config))) { diff --git a/core/pipeline/PipelineManager.h b/core/pipeline/PipelineConfigManager.h similarity index 89% rename from core/pipeline/PipelineManager.h rename to core/pipeline/PipelineConfigManager.h index ccb1717587..509ef85e3c 100644 --- a/core/pipeline/PipelineManager.h +++ b/core/pipeline/PipelineConfigManager.h @@ -36,9 +36,9 @@ class PipelineManager { return &instance; } - void UpdatePipelines(ConfigDiff& diff); - std::shared_ptr FindPipelineByName(const std::string& configName) const; - std::vector GetAllPipelineNames() const; + void UpdatePipelines(PipelineConfigDiff& diff); + std::shared_ptr FindConfigByName(const std::string& configName) const; + std::vector GetAllConfigNames() const; std::string GetPluginStatistics() const; // for shennong only const std::unordered_map>& GetAllPipelines() const { @@ -51,7 +51,7 @@ class PipelineManager { PipelineManager() = default; ~PipelineManager() = default; - virtual std::shared_ptr BuildPipeline(Config&& config); // virtual for ut + virtual std::shared_ptr BuildPipeline(PipelineConfig&& config); // virtual for ut void IncreasePluginUsageCnt( const std::unordered_map>& statistics); void DecreasePluginUsageCnt( diff --git a/core/pipeline/ProcessConfigManager.cpp b/core/pipeline/ProcessConfigManager.cpp new file mode 100644 index 0000000000..e2bbe10451 --- /dev/null +++ b/core/pipeline/ProcessConfigManager.cpp @@ -0,0 +1,61 @@ +/* + * Copyright 2023 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "pipeline/ProcessConfigManager.h" + +#include "config/feedbacker/ConfigFeedbackReceiver.h" + +using namespace std; + +namespace logtail { + +ProcessConfigManager::ProcessConfigManager() { +} + +void ProcessConfigManager::UpdateProcessConfigs(ProcessConfigDiff& diff) { + for (auto& config : diff.mAdded) { + std::shared_ptr configTmp(new ProcessConfig(config.mName, std::move(config.mDetail))); + mProcessConfigMap[config.mName] = configTmp; + ConfigFeedbackReceiver::GetInstance().FeedbackProcessConfigStatus(config.mName, ConfigFeedbackStatus::APPLIED); + } + for (auto& config : diff.mModified) { + std::shared_ptr configTmp(new ProcessConfig(config.mName, std::move(config.mDetail))); + mProcessConfigMap[config.mName] = configTmp; + ConfigFeedbackReceiver::GetInstance().FeedbackProcessConfigStatus(config.mName, ConfigFeedbackStatus::APPLIED); + } + for (auto& configName : diff.mRemoved) { + mProcessConfigMap.erase(configName); + ConfigFeedbackReceiver::GetInstance().FeedbackProcessConfigStatus(configName, ConfigFeedbackStatus::DELETED); + } +} + +std::shared_ptr ProcessConfigManager::FindConfigByName(const string& configName) const { + auto it = mProcessConfigMap.find(configName); + if (it != mProcessConfigMap.end()) { + return it->second; + } + return nullptr; +} + +vector ProcessConfigManager::GetAllConfigNames() const { + vector res; + for (const auto& item : mProcessConfigMap) { + res.push_back(item.first); + } + return res; +} + +} // namespace logtail diff --git a/core/pipeline/ProcessConfigManager.h b/core/pipeline/ProcessConfigManager.h new file mode 100644 index 0000000000..178b2c76b2 --- /dev/null +++ b/core/pipeline/ProcessConfigManager.h @@ -0,0 +1,53 @@ +/* + * Copyright 2023 iLogtail Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +#include "common/Lock.h" +#include "config/ConfigDiff.h" +#include "config/ProcessConfig.h" + +namespace logtail { + +class ProcessConfigManager { +public: + ProcessConfigManager(const ProcessConfigManager&) = delete; + ProcessConfigManager& operator=(const ProcessConfigManager&) = delete; + + static ProcessConfigManager* GetInstance() { + static ProcessConfigManager instance; + return &instance; + } + + void UpdateProcessConfigs(ProcessConfigDiff& diff); + std::shared_ptr FindConfigByName(const std::string& configName) const; + std::vector GetAllConfigNames() const; + +private: + ProcessConfigManager(); + ~ProcessConfigManager() = default; + std::map> mProcessConfigMap; + +#ifdef APSARA_UNIT_TEST_MAIN + friend class ProcessConfigManagerUnittest; +#endif +}; + +} // namespace logtail diff --git a/core/processor/daemon/LogProcess.cpp b/core/processor/daemon/LogProcess.cpp index 36d41662db..d2e70240e9 100644 --- a/core/processor/daemon/LogProcess.cpp +++ b/core/processor/daemon/LogProcess.cpp @@ -21,7 +21,7 @@ #include "monitor/LogFileProfiler.h" #include "monitor/LogtailAlarm.h" #include "monitor/Monitor.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "queue/ExactlyOnceQueueManager.h" #include "queue/ProcessQueueManager.h" #include "queue/QueueKeyManager.h" @@ -188,7 +188,7 @@ void* LogProcess::ProcessLoop(int32_t threadNo) { } mThreadFlags[threadNo] = true; - auto pipeline = PipelineManager::GetInstance()->FindPipelineByName(configName); + auto pipeline = PipelineManager::GetInstance()->FindConfigByName(configName); if (!pipeline) { LOG_INFO(sLogger, ("pipeline not found during processing, perhaps due to config deletion", diff --git a/core/unittest/config/CMakeLists.txt b/core/unittest/config/CMakeLists.txt index fe4db7f711..1b96a944d6 100644 --- a/core/unittest/config/CMakeLists.txt +++ b/core/unittest/config/CMakeLists.txt @@ -35,10 +35,14 @@ if (ENABLE_ENTERPRISE) target_link_libraries(legacy_config_provider_unittest unittest_base) endif () +add_executable(config_feedbackable_unittest ConfigFeedbackableUnittest.cpp) +target_link_libraries(config_feedbackable_unittest unittest_base) + include(GoogleTest) gtest_discover_tests(config_unittest) gtest_discover_tests(config_watcher_unittest) gtest_discover_tests(config_update_unittest) if (ENABLE_ENTERPRISE) gtest_discover_tests(legacy_config_provider_unittest) -endif () \ No newline at end of file +endif () +gtest_discover_tests(config_feedbackable_unittest) \ No newline at end of file diff --git a/core/unittest/config/ConfigFeedbackableUnittest.cpp b/core/unittest/config/ConfigFeedbackableUnittest.cpp new file mode 100644 index 0000000000..d66d03f23f --- /dev/null +++ b/core/unittest/config/ConfigFeedbackableUnittest.cpp @@ -0,0 +1,40 @@ +// Copyright 2023 iLogtail Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "config/feedbacker/ConfigFeedbackable.h" +#include "unittest/Unittest.h" + +using namespace std; + + +namespace logtail { + +class ConfigFeedbackableUnittest : public testing::Test { +public: + void TestToStringView(); +}; + +void ConfigFeedbackableUnittest::TestToStringView() { + APSARA_TEST_EQUAL(ToStringView(ConfigFeedbackStatus::APPLYING), "APPLYING"); + APSARA_TEST_EQUAL(ToStringView(ConfigFeedbackStatus::APPLIED), "APPLIED"); + APSARA_TEST_EQUAL(ToStringView(ConfigFeedbackStatus::FAILED), "FAILED"); + APSARA_TEST_EQUAL(ToStringView(ConfigFeedbackStatus::DELETED), "DELETED"); + APSARA_TEST_EQUAL(ToStringView(ConfigFeedbackStatus::UNSET), "UNKNOWN"); +} + +UNIT_TEST_CASE(ConfigFeedbackableUnittest, TestToStringView) + +} // namespace logtail + +UNIT_TEST_MAIN diff --git a/core/unittest/config/ConfigMatchUnittest.cpp b/core/unittest/config/ConfigMatchUnittest.cpp index f991081a89..9f95bd683d 100644 --- a/core/unittest/config/ConfigMatchUnittest.cpp +++ b/core/unittest/config/ConfigMatchUnittest.cpp @@ -1043,7 +1043,7 @@ void ConfigMatchUnittest::TestChinesePathAndFilePattern() { filePattern = EncodingConverter::GetInstance()->FromACPToUTF8(filePattern); #endif { - Config cfg(basePath, filePattern, LogType::REGEX_LOG, "log", ".*", "", "", "project", true, 3, 3, "logstore"); + PipelineConfig cfg(basePath, filePattern, LogType::REGEX_LOG, "log", ".*", "", "", "project", true, 3, 3, "logstore"); fsutil::Dir dir(pathRoot); APSARA_TEST_TRUE(dir.Open()); while (fsutil::Entry ent = dir.ReadNext()) { diff --git a/core/unittest/config/ConfigUnittest.cpp b/core/unittest/config/ConfigUnittest.cpp index 9b3a90415a..57f06377b8 100644 --- a/core/unittest/config/ConfigUnittest.cpp +++ b/core/unittest/config/ConfigUnittest.cpp @@ -18,7 +18,7 @@ #include #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "plugin/PluginRegistry.h" #include "unittest/Unittest.h" @@ -49,7 +49,7 @@ class ConfigUnittest : public testing::Test { void ConfigUnittest::HandleValidConfig() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; configStr = R"( { @@ -92,7 +92,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(configName, config->mName); APSARA_TEST_EQUAL(123456789U, config->mCreateTime); @@ -125,7 +125,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -157,7 +157,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 3: (native, extended) -> native -> native @@ -185,7 +185,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 4: native -> extended -> native @@ -210,7 +210,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -242,7 +242,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -282,7 +282,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 7: native -> (native -> extended) -> native @@ -310,7 +310,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(2U, config->mProcessors.size()); @@ -350,7 +350,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 9: (native, extended) -> (native -> extended) -> native @@ -386,7 +386,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 10: native -> none -> native @@ -406,7 +406,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -433,7 +433,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -468,7 +468,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 13: native -> native -> extended @@ -493,7 +493,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -530,7 +530,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 15: (native, extended) -> native -> extended @@ -563,7 +563,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 16: native -> extended -> extended @@ -588,7 +588,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -620,7 +620,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -660,7 +660,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 19: native -> (native -> extended) -> extended @@ -688,7 +688,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(2U, config->mProcessors.size()); @@ -728,7 +728,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 21: (native, extended) -> (native -> extended) -> extended @@ -764,7 +764,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 22: native -> none -> extended @@ -784,7 +784,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -811,7 +811,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -846,7 +846,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 25: native -> native -> (native, extended) (future changes maybe applied) @@ -874,7 +874,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -914,7 +914,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 27: (native, extended) -> native -> (native, extended) @@ -950,7 +950,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 28: native -> extended -> (native, extended) @@ -978,7 +978,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -1013,7 +1013,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(1U, config->mProcessors.size()); @@ -1056,7 +1056,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 31: native -> (naive -> extended) -> (native, extended) @@ -1087,7 +1087,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(2U, config->mProcessors.size()); @@ -1130,7 +1130,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 33: (native, extended) -> (native -> extended) -> (native, extended) @@ -1169,7 +1169,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 34: native -> none -> (native, extended) (future changes maybe applied) @@ -1192,7 +1192,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -1222,7 +1222,7 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(1U, config->mInputs.size()); APSARA_TEST_EQUAL(0U, config->mProcessors.size()); @@ -1260,14 +1260,14 @@ void ConfigUnittest::HandleValidConfig() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void ConfigUnittest::HandleInvalidCreateTime() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; configStr = R"( { @@ -1286,7 +1286,7 @@ void ConfigUnittest::HandleInvalidCreateTime() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); APSARA_TEST_EQUAL(0U, config->mCreateTime); } @@ -1294,7 +1294,7 @@ void ConfigUnittest::HandleInvalidCreateTime() const { void ConfigUnittest::HandleInvalidGlobal() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // global is not of type object configStr = R"( @@ -1304,14 +1304,14 @@ void ConfigUnittest::HandleInvalidGlobal() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void ConfigUnittest::HandleInvalidInputs() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // no inputs configStr = R"( @@ -1325,7 +1325,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // inputs is not of type array @@ -1341,7 +1341,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // inputs is empty @@ -1357,7 +1357,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // inputs element is not of type object @@ -1375,7 +1375,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // no Type @@ -1395,7 +1395,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // Type is not of type string @@ -1415,7 +1415,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // unsupported input @@ -1435,7 +1435,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); configStr = R"( @@ -1457,7 +1457,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); configStr = R"( @@ -1479,7 +1479,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); // more than 1 native input @@ -1502,7 +1502,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // native and extended inputs coexist @@ -1525,7 +1525,7 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); configStr = R"( @@ -1547,14 +1547,14 @@ void ConfigUnittest::HandleInvalidInputs() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void ConfigUnittest::HandleInvalidProcessors() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // processors is not of type array configStr = R"( @@ -1569,7 +1569,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // processors element is not of type object @@ -1587,7 +1587,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // no Type @@ -1607,7 +1607,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // Type is not of type string @@ -1627,7 +1627,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // unsupported processors @@ -1647,7 +1647,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); configStr = R"( @@ -1666,7 +1666,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); configStr = R"( @@ -1688,7 +1688,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // native processor plugin comes after extended processor plugin @@ -1711,7 +1711,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // native processor plugins coexist with extended input plugins @@ -1731,7 +1731,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // native processor plugins coexist with input_observer_network @@ -1751,7 +1751,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // native processor plugins coexist with processor_spl @@ -1774,7 +1774,7 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); configStr = R"( @@ -1796,14 +1796,14 @@ void ConfigUnittest::HandleInvalidProcessors() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void ConfigUnittest::HandleInvalidAggregators() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // aggregators is not of type array configStr = R"( @@ -1823,7 +1823,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // aggregators element is not of type object @@ -1846,7 +1846,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // no Type @@ -1871,7 +1871,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // Type is not of type string @@ -1896,7 +1896,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // unsupported aggregator @@ -1921,7 +1921,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // more than 1 aggregator @@ -1949,7 +1949,7 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // aggregator plugins exist in native flushing mode @@ -1974,14 +1974,14 @@ void ConfigUnittest::HandleInvalidAggregators() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void ConfigUnittest::HandleInvalidFlushers() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // no flushers configStr = R"( @@ -1995,7 +1995,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // flushers is not of type array @@ -2011,7 +2011,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // flushers is empty @@ -2027,7 +2027,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // flushers element is not of type object @@ -2045,7 +2045,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // no Type @@ -2065,7 +2065,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // Type is not of type string @@ -2085,7 +2085,7 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // unsupported flusher @@ -2105,14 +2105,14 @@ void ConfigUnittest::HandleInvalidFlushers() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); } void ConfigUnittest::HandleInvalidExtensions() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; // extensions is not of type array configStr = R"( @@ -2132,7 +2132,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // extensions element is not of type object @@ -2155,7 +2155,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // no Type @@ -2180,7 +2180,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // Type is not of type string @@ -2205,7 +2205,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // unsupported extension @@ -2230,7 +2230,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // extension plugins exist when no extended plugin is given @@ -2255,7 +2255,7 @@ void ConfigUnittest::HandleInvalidExtensions() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } @@ -2271,7 +2271,7 @@ void ConfigUnittest::TestReplaceEnvVarRef() const { unique_ptr configJson; Json::Value resJson; string configStr, resStr, errorMsg; - unique_ptr config; + unique_ptr config; configStr = R"( { @@ -2301,7 +2301,7 @@ void ConfigUnittest::TestReplaceEnvVarRef() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(resStr, resJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->ReplaceEnvVar()); APSARA_TEST_TRUE(*config->mDetail == resJson); } diff --git a/core/unittest/config/ConfigUpdateUnittest.cpp b/core/unittest/config/ConfigUpdateUnittest.cpp index 4cb75a8a9e..c99e362133 100644 --- a/core/unittest/config/ConfigUpdateUnittest.cpp +++ b/core/unittest/config/ConfigUpdateUnittest.cpp @@ -18,10 +18,10 @@ #include #include -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "config/watcher/ConfigWatcher.h" #include "pipeline/Pipeline.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "plugin/PluginRegistry.h" #include "unittest/Unittest.h" @@ -31,7 +31,7 @@ namespace logtail { class PipelineMock : public Pipeline { public: - bool Init(Config&& config) { + bool Init(PipelineConfig&& config) { mConfig = std::move(config.mDetail); return (*mConfig)["valid"].asBool(); } @@ -50,7 +50,7 @@ class PipelineManagerMock : public PipelineManager { } private: - shared_ptr BuildPipeline(Config&& config) override { + shared_ptr BuildPipeline(PipelineConfig&& config) override { // this should be synchronized with PipelineManager::BuildPipeline, except for the pointer type. shared_ptr p = make_shared(); if (!p->Init(std::move(config))) { @@ -81,7 +81,7 @@ class ConfigUpdateUnittest : public testing::Test { void SetUp() override { filesystem::create_directories(configDir); - ConfigWatcher::GetInstance()->AddSource(configDir.string()); + ConfigWatcher::GetInstance()->AddPipelineSource(configDir.string()); } void TearDown() override { @@ -197,12 +197,12 @@ class ConfigUpdateUnittest : public testing::Test { }; void ConfigUpdateUnittest::OnStartUp() const { - ConfigDiff diff; - diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff; + diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); GenerateInitialConfigs(); - diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(2U, diff.mAdded.size()); APSARA_TEST_TRUE(diff.mModified.empty()); @@ -210,15 +210,15 @@ void ConfigUpdateUnittest::OnStartUp() const { APSARA_TEST_TRUE(diff.mUnchanged.empty()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); } void ConfigUpdateUnittest::OnConfigDelete() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); filesystem::remove_all(configDir); - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_TRUE(diff.mAdded.empty()); APSARA_TEST_TRUE(diff.mModified.empty()); @@ -226,30 +226,30 @@ void ConfigUpdateUnittest::OnConfigDelete() const { APSARA_TEST_TRUE(diff.mUnchanged.empty()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_TRUE(PipelineManagerMock::GetInstance()->GetAllPipelineNames().empty()); + APSARA_TEST_TRUE(PipelineManagerMock::GetInstance()->GetAllConfigNames().empty()); } void ConfigUpdateUnittest::OnConfigToInvalidFormat() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); for (const auto& path : configPaths) { ofstream fout(path, ios::trunc); fout << newInvalidConfigWithInvalidFormat; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); } void ConfigUpdateUnittest::OnConfigToInvalidDetail() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); for (const auto& path : configPaths) { ofstream fout(path, ios::trunc); fout << newInvalidConfigWithInvalidDetail; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(3U, diff.mAdded.size()); APSARA_TEST_EQUAL(1U, diff.mModified.size()); @@ -257,18 +257,18 @@ void ConfigUpdateUnittest::OnConfigToInvalidDetail() const { APSARA_TEST_TRUE(diff.mUnchanged.empty()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); } void ConfigUpdateUnittest::OnConfigToEnabledValid() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); for (const auto& path : configPaths) { ofstream fout(path, ios::trunc); fout << newEnabledValidConfig; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(3U, diff.mAdded.size()); APSARA_TEST_EQUAL(1U, diff.mModified.size()); @@ -276,18 +276,18 @@ void ConfigUpdateUnittest::OnConfigToEnabledValid() const { APSARA_TEST_TRUE(diff.mUnchanged.empty()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_EQUAL(4U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(4U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); } void ConfigUpdateUnittest::OnConfigToDisabledValid() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); for (const auto& path : configPaths) { ofstream fout(path, ios::trunc); fout << newDisabledValidConfig; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_TRUE(diff.mAdded.empty()); APSARA_TEST_TRUE(diff.mModified.empty()); @@ -295,14 +295,14 @@ void ConfigUpdateUnittest::OnConfigToDisabledValid() const { APSARA_TEST_TRUE(diff.mUnchanged.empty()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_TRUE(PipelineManagerMock::GetInstance()->GetAllPipelineNames().empty()); + APSARA_TEST_TRUE(PipelineManagerMock::GetInstance()->GetAllConfigNames().empty()); } void ConfigUpdateUnittest::OnConfigUnchanged() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); GenerateInitialConfigs(); @@ -311,7 +311,7 @@ void ConfigUpdateUnittest::OnConfigUnchanged() const { filesystem::file_time_type fTime = filesystem::last_write_time(path); filesystem::last_write_time(path, fTime + 1s); } - diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(1U, diff.mAdded.size()); APSARA_TEST_TRUE(diff.mModified.empty()); @@ -319,12 +319,12 @@ void ConfigUpdateUnittest::OnConfigUnchanged() const { APSARA_TEST_EQUAL(1U, diff.mUnchanged.size()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); } void ConfigUpdateUnittest::OnConfigAdded() const { PrepareInitialSettings(); - APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(1U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); { ofstream fout(configDir / "add_invalid_format.json", ios::trunc); @@ -342,7 +342,7 @@ void ConfigUpdateUnittest::OnConfigAdded() const { ofstream fout(configDir / "add_disabled_valid.json", ios::trunc); fout << disabledValidConfig; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(2U, diff.mAdded.size()); APSARA_TEST_TRUE(diff.mModified.empty()); @@ -350,12 +350,12 @@ void ConfigUpdateUnittest::OnConfigAdded() const { APSARA_TEST_EQUAL(1U, diff.mUnchanged.size()); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); - APSARA_TEST_EQUAL(2U, PipelineManagerMock::GetInstance()->GetAllPipelineNames().size()); + APSARA_TEST_EQUAL(2U, PipelineManagerMock::GetInstance()->GetAllConfigNames().size()); } void ConfigUpdateUnittest::PrepareInitialSettings() const { GenerateInitialConfigs(); - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); PipelineManagerMock::GetInstance()->UpdatePipelines(diff); } diff --git a/core/unittest/config/ConfigUpdatorUnittest.cpp b/core/unittest/config/ConfigUpdatorUnittest.cpp index 6dc4c4d009..2044e064c4 100644 --- a/core/unittest/config/ConfigUpdatorUnittest.cpp +++ b/core/unittest/config/ConfigUpdatorUnittest.cpp @@ -932,10 +932,10 @@ void ConfigUpdatorUnittest::TestLogRotateWhenUpdate() { WaitForFileBeenRead(); sleep(2 * INT32_FLAG(batch_send_interval) + 2); - unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; - unordered_map::iterator it = configMap.find("commonreg.com"); + unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; + unordered_map::iterator it = configMap.find("commonreg.com"); APSARA_TEST_TRUE(it != configMap.end()); - Config* config = it->second; + PipelineConfig* config = it->second; APSARA_TEST_EQUAL(config->mProjectName, "2000000_proj"); APSARA_TEST_EQUAL(config->mBasePath, mRootDir + PATH_SEPARATOR + "comm"); APSARA_TEST_EQUAL(config->mVersion, 1); @@ -1032,10 +1032,10 @@ void ConfigUpdatorUnittest::TestConfigUpdate() { WaitForFileBeenRead(); sleep(2 * INT32_FLAG(batch_send_interval) + 2); - unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; - unordered_map::iterator it = configMap.find("commonreg.com"); + unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; + unordered_map::iterator it = configMap.find("commonreg.com"); APSARA_TEST_TRUE(it != configMap.end()); - Config* config = it->second; + PipelineConfig* config = it->second; APSARA_TEST_EQUAL(config->mProjectName, "2000000_proj"); APSARA_TEST_EQUAL(config->mBasePath, mRootDir + PATH_SEPARATOR + "comm"); APSARA_TEST_EQUAL(config->mVersion, 1); @@ -1271,10 +1271,10 @@ void ConfigUpdatorUnittest::TestLocalConfigUpdate() { sleep(2 * INT32_FLAG(batch_send_interval) + 2); LOG_INFO(sLogger, ("Test config update status", "")); - unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; - unordered_map::iterator it = configMap.find("commonreg.com"); + unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; + unordered_map::iterator it = configMap.find("commonreg.com"); APSARA_TEST_TRUE(it != configMap.end()); - Config* config = it->second; + PipelineConfig* config = it->second; APSARA_TEST_EQUAL(config->mProjectName, "2000000_proj"); APSARA_TEST_EQUAL(config->mBasePath, (bfs::path(mRootDir) / "comm").string()); APSARA_TEST_EQUAL(config->mVersion, 1); @@ -2271,11 +2271,11 @@ void ConfigUpdatorUnittest::TestUpdateGroupTopic() { WaitForFileBeenRead(); sleep(2 * INT32_FLAG(batch_send_interval) + 2); - unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; - unordered_map::iterator it; + unordered_map& configMap = ConfigManager::GetInstance()->mNameConfigMap; + unordered_map::iterator it; it = configMap.find("apsara_log"); APSARA_TEST_TRUE(it != configMap.end()); - Config* config = it->second; + PipelineConfig* config = it->second; APSARA_TEST_EQUAL(config->mProjectName, "8000000_proj"); APSARA_TEST_EQUAL(config->mBasePath, mRootDir + PATH_SEPARATOR + "apsara_log"); APSARA_TEST_EQUAL(config->mVersion, 1); @@ -2638,16 +2638,16 @@ void ConfigUpdatorUnittest::TestValidWildcardPath2() { void ConfigUpdatorUnittest::TestWithinMaxDepth() { // No wildcard. - Config* cfg_1 - = new Config(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 0, "cat"); + PipelineConfig* cfg_1 + = new PipelineConfig(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 0, "cat"); EXPECT_EQ(cfg_1->WithinMaxDepth(PS + "abc"), false); EXPECT_EQ(cfg_1->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f"), true); EXPECT_EQ(cfg_1->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "fx"), false); EXPECT_EQ(cfg_1->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f" + PS + "ghi"), false); delete cfg_1; // To be compatible with old settings - Config* cfg_2 - = new Config(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, -1, "cat"); + PipelineConfig* cfg_2 + = new PipelineConfig(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, -1, "cat"); EXPECT_EQ(cfg_2->WithinMaxDepth(PS + "abc"), true); EXPECT_EQ(cfg_2->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f"), true); EXPECT_EQ(cfg_2->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "fx"), true); @@ -2655,8 +2655,8 @@ void ConfigUpdatorUnittest::TestWithinMaxDepth() { EXPECT_EQ(cfg_2->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f" + PS + "ghi" + PS + "agec" + PS + "egegt"), true); delete cfg_2; - Config* cfg_3 - = new Config(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); + PipelineConfig* cfg_3 + = new PipelineConfig(PS + "abc" + PS + "de" + PS + "f", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); EXPECT_EQ(cfg_3->WithinMaxDepth(PS + "abc"), false); EXPECT_EQ(cfg_3->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f"), true); EXPECT_EQ(cfg_3->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "fx"), false); @@ -2672,15 +2672,15 @@ void ConfigUpdatorUnittest::TestWithinMaxDepth() { delete cfg_3; // Wildcard. - Config* cfg_4 - = new Config(PS + "ab?" + PS + "de" + PS + "*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 0, "cat"); + PipelineConfig* cfg_4 + = new PipelineConfig(PS + "ab?" + PS + "de" + PS + "*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 0, "cat"); EXPECT_EQ(cfg_4->WithinMaxDepth(PS + "abc"), false); EXPECT_EQ(cfg_4->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f"), true); EXPECT_EQ(cfg_4->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "xyz"), true); EXPECT_EQ(cfg_4->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f" + PS + "ghi"), false); delete cfg_4; // To be compatible with old settings. - Config* cfg_5 = new Config( + PipelineConfig* cfg_5 = new PipelineConfig( PS + "abc" + PS + "de?" + PS + "f*" + PS + "xyz", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, -1, "cat", ""); EXPECT_EQ(cfg_5->WithinMaxDepth(PS + "abc"), true); EXPECT_EQ(cfg_5->WithinMaxDepth(PS + "abc" + PS + "def" + PS + "fgz"), true); @@ -2692,8 +2692,8 @@ void ConfigUpdatorUnittest::TestWithinMaxDepth() { true); delete cfg_5; - Config* cfg_6 - = new Config(PS + "abc" + PS + "d?" + PS + "f*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); + PipelineConfig* cfg_6 + = new PipelineConfig(PS + "abc" + PS + "d?" + PS + "f*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); EXPECT_EQ(cfg_6->WithinMaxDepth(PS + "abc"), false); EXPECT_EQ(cfg_6->WithinMaxDepth(PS + "abc" + PS + "de"), false); EXPECT_EQ(cfg_6->WithinMaxDepth(PS + "abc" + PS + "de" + PS + "f"), true); @@ -2713,12 +2713,12 @@ void ConfigUpdatorUnittest::TestWithinMaxDepth() { // Wildcard on root path, only Windows works. { #if defined(__linux__) - Config cfg("/*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); + PipelineConfig cfg("/*", "x.log", REGEX_LOG, "a", "", "", "", "prj", true, 0, 3, "cat"); EXPECT_TRUE(cfg.WithinMaxDepth("/var")); BOOL_FLAG(enable_root_path_collection) = true; EXPECT_TRUE(cfg.WithinMaxDepth("/var")); #elif defined(_MSC_VER) - Config cfg("D:\\*", "x.log", REGEX_LOG, "a", "", "prj", true, 0, 3, "cat"); + PipelineConfig cfg("D:\\*", "x.log", REGEX_LOG, "a", "", "prj", true, 0, 3, "cat"); EXPECT_TRUE(!cfg.WithinMaxDepth("D:\\var")); BOOL_FLAG(enable_root_path_collection) = true; EXPECT_TRUE(cfg.WithinMaxDepth("D:\\var")); @@ -2728,7 +2728,7 @@ void ConfigUpdatorUnittest::TestWithinMaxDepth() { } void ConfigUpdatorUnittest::TestParseWildcardPath() { - Config cfg(PS, "*.log", APSARA_LOG, "x", "", "", "", "prj", true, 0, 0, "cat"); + PipelineConfig cfg(PS, "*.log", APSARA_LOG, "x", "", "", "", "prj", true, 0, 0, "cat"); std::string pathRoot = ""; #if defined(_MSC_VER) @@ -2789,7 +2789,7 @@ void ConfigUpdatorUnittest::TestParseWildcardPath() { } void ConfigUpdatorUnittest::TestIsWildcardPathMatch() { - Config cfg(PS, "*.log", APSARA_LOG, "x", "", "", "", "prj", true, 100, 100, "cat"); + PipelineConfig cfg(PS, "*.log", APSARA_LOG, "x", "", "", "", "prj", true, 100, 100, "cat"); cfg.mBasePath = PS + "usr" + PS + "?" + PS + "abc" + PS + "*" + PS + "def"; cfg.ParseWildcardPath(); diff --git a/core/unittest/config/ConfigWatcherUnittest.cpp b/core/unittest/config/ConfigWatcherUnittest.cpp index 35388d0a03..7562c09023 100644 --- a/core/unittest/config/ConfigWatcherUnittest.cpp +++ b/core/unittest/config/ConfigWatcherUnittest.cpp @@ -31,27 +31,44 @@ class ConfigWatcherUnittest : public testing::Test { void DuplicateConfigs() const; protected: - void SetUp() override { ConfigWatcher::GetInstance()->AddSource(configDir.string()); } + void SetUp() override { + ConfigWatcher::GetInstance()->AddPipelineSource(configDir.string()); + ConfigWatcher::GetInstance()->AddProcessSource(processConfigDir.string()); + } void TearDown() override { ConfigWatcher::GetInstance()->ClearEnvironment(); } private: static const filesystem::path configDir; + static const filesystem::path processConfigDir; }; const filesystem::path ConfigWatcherUnittest::configDir = "./config"; +const filesystem::path ConfigWatcherUnittest::processConfigDir = "./processconfig"; void ConfigWatcherUnittest::InvalidConfigDirFound() const { - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + { + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); { ofstream fout("config"); } - diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); filesystem::remove("config"); + } + { + ProcessConfigDiff diff = ConfigWatcher::GetInstance()->CheckProcessConfigDiff(); + APSARA_TEST_TRUE(diff.IsEmpty()); + + { ofstream fout("processconfig"); } + diff = ConfigWatcher::GetInstance()->CheckProcessConfigDiff(); + APSARA_TEST_TRUE(diff.IsEmpty()); + filesystem::remove("processconfig"); + } } void ConfigWatcherUnittest::InvalidConfigFileFound() const { + { filesystem::create_directories(configDir); filesystem::create_directories(configDir / "dir"); @@ -61,15 +78,31 @@ void ConfigWatcherUnittest::InvalidConfigFileFound() const { ofstream fout(configDir / "invalid_format.json"); fout << "[}"; } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_TRUE(diff.IsEmpty()); filesystem::remove_all(configDir); + } + { + filesystem::create_directories(processConfigDir); + + filesystem::create_directories(processConfigDir / "dir"); + { ofstream fout(processConfigDir / "unsupported_extenstion.zip"); } + { ofstream fout(processConfigDir / "empty_file.json"); } + { + ofstream fout(processConfigDir / "invalid_format.json"); + fout << "[}"; + } + ProcessConfigDiff diff = ConfigWatcher::GetInstance()->CheckProcessConfigDiff(); + APSARA_TEST_TRUE(diff.IsEmpty()); + filesystem::remove_all(processConfigDir); + } } void ConfigWatcherUnittest::DuplicateConfigs() const { + { PluginRegistry::GetInstance()->LoadPlugins(); - ConfigWatcher::GetInstance()->AddSource("dir1"); - ConfigWatcher::GetInstance()->AddSource("dir2"); + ConfigWatcher::GetInstance()->AddPipelineSource("dir1"); + ConfigWatcher::GetInstance()->AddPipelineSource("dir2"); filesystem::create_directories("config"); filesystem::create_directories("dir1"); @@ -93,7 +126,7 @@ void ConfigWatcherUnittest::DuplicateConfigs() const { )"; } { ofstream fout("dir2/config.json"); } - ConfigDiff diff = ConfigWatcher::GetInstance()->CheckConfigDiff(); + PipelineConfigDiff diff = ConfigWatcher::GetInstance()->CheckPipelineConfigDiff(); APSARA_TEST_FALSE(diff.IsEmpty()); APSARA_TEST_EQUAL(1U, diff.mAdded.size()); @@ -101,6 +134,37 @@ void ConfigWatcherUnittest::DuplicateConfigs() const { filesystem::remove_all("dir2"); filesystem::remove_all("config"); PluginRegistry::GetInstance()->UnloadPlugins(); + } + { + PluginRegistry::GetInstance()->LoadPlugins(); + ConfigWatcher::GetInstance()->AddProcessSource("dir1"); + ConfigWatcher::GetInstance()->AddProcessSource("dir2"); + + filesystem::create_directories("processconfig"); + filesystem::create_directories("dir1"); + filesystem::create_directories("dir2"); + + { + ofstream fout("dir1/config.json"); + fout << R"( + { + "enable": true, + "max_bytes_per_sec": 1234, + "mem_usage_limit": 456, + "cpu_usage_limit": 2 + } + )"; + } + { ofstream fout("dir2/config.json"); } + ProcessConfigDiff diff = ConfigWatcher::GetInstance()->CheckProcessConfigDiff(); + APSARA_TEST_FALSE(diff.IsEmpty()); + APSARA_TEST_EQUAL(1U, diff.mAdded.size()); + + filesystem::remove_all("dir1"); + filesystem::remove_all("dir2"); + filesystem::remove_all("processconfig"); + PluginRegistry::GetInstance()->UnloadPlugins(); + } } UNIT_TEST_CASE(ConfigWatcherUnittest, InvalidConfigDirFound) diff --git a/core/unittest/pipeline/CMakeLists.txt b/core/unittest/pipeline/CMakeLists.txt index dc1f7deee3..43304a1900 100644 --- a/core/unittest/pipeline/CMakeLists.txt +++ b/core/unittest/pipeline/CMakeLists.txt @@ -24,7 +24,11 @@ target_link_libraries(pipeline_unittest unittest_base) add_executable(pipeline_manager_unittest PipelineManagerUnittest.cpp) target_link_libraries(pipeline_manager_unittest unittest_base) +add_executable(process_config_manager_unittest ProcessConfigManagerUnittest.cpp) +target_link_libraries(process_config_manager_unittest unittest_base) + include(GoogleTest) gtest_discover_tests(global_config_unittest) gtest_discover_tests(pipeline_unittest) gtest_discover_tests(pipeline_manager_unittest) +gtest_discover_tests(process_config_manager_unittest) diff --git a/core/unittest/pipeline/PipelineManagerUnittest.cpp b/core/unittest/pipeline/PipelineManagerUnittest.cpp index 5b89f7dac3..7c52f038a8 100644 --- a/core/unittest/pipeline/PipelineManagerUnittest.cpp +++ b/core/unittest/pipeline/PipelineManagerUnittest.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "pipeline/Pipeline.h" -#include "pipeline/PipelineManager.h" +#include "pipeline/PipelineConfigManager.h" #include "unittest/Unittest.h" using namespace std; @@ -29,9 +29,9 @@ void PipelineManagerUnittest::TestPipelineManagement() const { PipelineManager::GetInstance()->mPipelineNameEntityMap["test1"] = make_shared(); PipelineManager::GetInstance()->mPipelineNameEntityMap["test2"] = make_shared(); - APSARA_TEST_EQUAL(2U, PipelineManager::GetInstance()->GetAllPipelineNames().size()); - APSARA_TEST_NOT_EQUAL(nullptr, PipelineManager::GetInstance()->FindPipelineByName("test1")); - APSARA_TEST_EQUAL(nullptr, PipelineManager::GetInstance()->FindPipelineByName("test3")); + APSARA_TEST_EQUAL(2U, PipelineManager::GetInstance()->GetAllConfigNames().size()); + APSARA_TEST_NOT_EQUAL(nullptr, PipelineManager::GetInstance()->FindConfigByName("test1")); + APSARA_TEST_EQUAL(nullptr, PipelineManager::GetInstance()->FindConfigByName("test3")); } UNIT_TEST_CASE(PipelineManagerUnittest, TestPipelineManagement) diff --git a/core/unittest/pipeline/PipelineUnittest.cpp b/core/unittest/pipeline/PipelineUnittest.cpp index 1e7cfc535b..414affefd3 100644 --- a/core/unittest/pipeline/PipelineUnittest.cpp +++ b/core/unittest/pipeline/PipelineUnittest.cpp @@ -20,7 +20,7 @@ #include "app_config/AppConfig.h" #include "common/JsonUtil.h" #include "common/LogstoreFeedbackKey.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "input/InputFeedbackInterfaceRegistry.h" #include "pipeline/Pipeline.h" #include "plugin/PluginRegistry.h" @@ -63,7 +63,7 @@ void PipelineUnittest::OnSuccessfulInit() const { unique_ptr configJson; Json::Value goPipelineWithInput, goPipelineWithoutInput; string configStr, goPipelineWithInputStr, goPipelineWithoutInputStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; // with sls flusher @@ -91,7 +91,7 @@ void PipelineUnittest::OnSuccessfulInit() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -124,7 +124,7 @@ void PipelineUnittest::OnSuccessfulInit() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -221,7 +221,7 @@ void PipelineUnittest::OnSuccessfulInit() const { APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -234,7 +234,7 @@ void PipelineUnittest::OnSuccessfulInit() const { void PipelineUnittest::OnFailedInit() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; // invalid input @@ -259,7 +259,7 @@ void PipelineUnittest::OnFailedInit() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_FALSE(pipeline->Init(std::move(*config))); @@ -294,7 +294,7 @@ void PipelineUnittest::OnFailedInit() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_FALSE(pipeline->Init(std::move(*config))); @@ -319,7 +319,7 @@ void PipelineUnittest::OnFailedInit() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_FALSE(pipeline->Init(std::move(*config))); @@ -329,7 +329,7 @@ void PipelineUnittest::OnInitVariousTopology() const { unique_ptr configJson; Json::Value goPipelineWithInput, goPipelineWithoutInput; string configStr, goPipelineWithInputStr, goPipelineWithoutInputStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; // topology 1: native -> native -> native @@ -364,7 +364,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -403,7 +403,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 3: (native, extended) -> native -> native @@ -441,7 +441,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 4: native -> extended -> native @@ -509,7 +509,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -587,7 +587,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -636,7 +636,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 7: native -> (native -> extended) -> native @@ -710,7 +710,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -759,7 +759,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 9: (native, extended) -> (native -> extended) -> native @@ -806,7 +806,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 10: native -> none -> native @@ -833,7 +833,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -899,7 +899,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -943,7 +943,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 13: native -> native -> extended @@ -1001,7 +1001,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1042,7 +1042,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 15: (native, extended) -> native -> extended @@ -1081,7 +1081,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 16: native -> extended -> extended @@ -1142,7 +1142,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1213,7 +1213,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1257,7 +1257,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 19: native -> (native -> extended) -> extended @@ -1324,7 +1324,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1368,7 +1368,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 21: (native, extended) -> (native -> extended) -> extended @@ -1410,7 +1410,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 22: native -> none -> extended @@ -1460,7 +1460,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1520,7 +1520,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1559,7 +1559,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 25: native -> native -> (native, extended) (future changes maybe applied) @@ -1631,7 +1631,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1680,7 +1680,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 27: (native, extended) -> native -> (native, extended) @@ -1727,7 +1727,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 28: native -> extended -> (native, extended) @@ -1802,7 +1802,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1887,7 +1887,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -1939,7 +1939,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 31: native -> (native -> extended) -> (native, extended) @@ -2020,7 +2020,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2072,7 +2072,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 33: (native, extended) -> (native -> extended) -> (native, extended) @@ -2122,7 +2122,7 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); // topology 34: native -> none -> (native, extended) (future changes maybe applied) @@ -2186,7 +2186,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2260,7 +2260,7 @@ void PipelineUnittest::OnInitVariousTopology() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2307,14 +2307,14 @@ void PipelineUnittest::OnInitVariousTopology() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_FALSE(config->Parse()); } void PipelineUnittest::TestProcessQueue() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; QueueKey key; list::iterator que; @@ -2346,7 +2346,7 @@ void PipelineUnittest::TestProcessQueue() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2393,7 +2393,7 @@ void PipelineUnittest::TestProcessQueue() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2426,7 +2426,7 @@ void PipelineUnittest::TestProcessQueue() const { void PipelineUnittest::OnInputFileWithJsonMultiline() const { unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; // first processor is native json parser @@ -2460,7 +2460,7 @@ void PipelineUnittest::OnInputFileWithJsonMultiline() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2497,7 +2497,7 @@ void PipelineUnittest::OnInputFileWithJsonMultiline() const { )"; configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2509,7 +2509,7 @@ void PipelineUnittest::OnInputFileWithContainerDiscovery() const { unique_ptr configJson; Json::Value goPipelineWithInput, goPipelineWithoutInput; string configStr, goPipelineWithoutInputStr, goPipelineWithInputStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; // native processing @@ -2561,7 +2561,7 @@ void PipelineUnittest::OnInputFileWithContainerDiscovery() const { configJson.reset(new Json::Value()); APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); @@ -2647,7 +2647,7 @@ void PipelineUnittest::OnInputFileWithContainerDiscovery() const { APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithInputStr, goPipelineWithInput, errorMsg)); APSARA_TEST_TRUE(ParseJsonTable(goPipelineWithoutInputStr, goPipelineWithoutInput, errorMsg)); - config.reset(new Config(configName, std::move(configJson))); + config.reset(new PipelineConfig(configName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); diff --git a/core/unittest/pipeline/ProcessConfigManagerUnittest.cpp b/core/unittest/pipeline/ProcessConfigManagerUnittest.cpp new file mode 100644 index 0000000000..73a2a879ff --- /dev/null +++ b/core/unittest/pipeline/ProcessConfigManagerUnittest.cpp @@ -0,0 +1,88 @@ +// Copyright 2023 iLogtail Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "app_config/AppConfig.h" +#include "common/JsonUtil.h" +#include "config/ProcessConfig.h" +#include "pipeline/ProcessConfigManager.h" +#include "unittest/Unittest.h" + +using namespace std; + +DECLARE_FLAG_BOOL(enable_send_tps_smoothing); +DECLARE_FLAG_BOOL(enable_flow_control); + +namespace logtail { + +class ProcessConfigManagerUnittest : public testing::Test { +public: + void TestUpdateProcessConfigs(); +}; + +void ProcessConfigManagerUnittest::TestUpdateProcessConfigs() { + AppConfig::GetInstance(); + // Added + { + ProcessConfigDiff configDiff; + std::string content + = R"({"enable":true,"max_bytes_per_sec":1234,"mem_usage_limit":456,"cpu_usage_limit":2,"bool":false,"int":-1,"int64":-1000000,"uint":10000,"uint64":100000000000,"double":123123.1,"string":"string","array":[1,2,3],"object":{"a":1}})"; + std::string errorMsg; + unique_ptr detail = unique_ptr(new Json::Value()); + APSARA_TEST_TRUE(ParseJsonTable(content, *detail, errorMsg)); + APSARA_TEST_TRUE(errorMsg.empty()); + ProcessConfig config("test1", std::move(detail)); + configDiff.mAdded.emplace_back(config); + ProcessConfigManager::GetInstance()->UpdateProcessConfigs(configDiff); + + APSARA_TEST_EQUAL(1U, ProcessConfigManager::GetInstance()->GetAllConfigNames().size()); + APSARA_TEST_NOT_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test1")); + APSARA_TEST_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test3")); + } + + // Modified + { + ProcessConfigDiff configDiff; + std::string content + = R"({"enable": true,"max_bytes_per_sec": 209715200, "mem_usage_limit":123, "cpu_usage_limit":4,"bool":false,"int":-1,"int64":-1000000,"uint":10000,"uint64":100000000000,"double":123123.1,"string":"string","array":[1,2,3],"object":{"a":1}})"; + std::string errorMsg; + unique_ptr detail = unique_ptr(new Json::Value()); + APSARA_TEST_TRUE(ParseJsonTable(content, *detail, errorMsg)); + APSARA_TEST_TRUE(errorMsg.empty()); + ProcessConfig config("test1", std::move(detail)); + configDiff.mModified.emplace_back(config); + ProcessConfigManager::GetInstance()->UpdateProcessConfigs(configDiff); + + APSARA_TEST_EQUAL(1U, ProcessConfigManager::GetInstance()->GetAllConfigNames().size()); + APSARA_TEST_NOT_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test1")); + APSARA_TEST_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test3")); + APSARA_TEST_NOT_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test1")); + } + + // mRemoved + { + ProcessConfigDiff configDiff; + configDiff.mRemoved.emplace_back("test1"); + ProcessConfigManager::GetInstance()->UpdateProcessConfigs(configDiff); + + APSARA_TEST_EQUAL(0U, ProcessConfigManager::GetInstance()->GetAllConfigNames().size()); + APSARA_TEST_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test1")); + APSARA_TEST_EQUAL(nullptr, ProcessConfigManager::GetInstance()->FindConfigByName("test3")); + } +} + +UNIT_TEST_CASE(ProcessConfigManagerUnittest, TestUpdateProcessConfigs) + +} // namespace logtail + +UNIT_TEST_MAIN diff --git a/core/unittest/processor/ParseContainerLogBenchmark.cpp b/core/unittest/processor/ParseContainerLogBenchmark.cpp index 35851a9acc..e708fef70d 100644 --- a/core/unittest/processor/ParseContainerLogBenchmark.cpp +++ b/core/unittest/processor/ParseContainerLogBenchmark.cpp @@ -17,7 +17,7 @@ #include #include -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "plugin/instance/ProcessorInstance.h" #include "processor/inner/ProcessorParseContainerLogNative.h" diff --git a/core/unittest/processor/ProcessorMergeMultilineLogNativeUnittest.cpp b/core/unittest/processor/ProcessorMergeMultilineLogNativeUnittest.cpp index becc7727fb..7c6863c09b 100644 --- a/core/unittest/processor/ProcessorMergeMultilineLogNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorMergeMultilineLogNativeUnittest.cpp @@ -15,7 +15,7 @@ #include "common/Constants.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "processor/inner/ProcessorMergeMultilineLogNative.h" #include "processor/inner/ProcessorSplitLogStringNative.h" diff --git a/core/unittest/processor/ProcessorParseApsaraNativeUnittest.cpp b/core/unittest/processor/ProcessorParseApsaraNativeUnittest.cpp index d896523761..1a79d32144 100644 --- a/core/unittest/processor/ProcessorParseApsaraNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseApsaraNativeUnittest.cpp @@ -15,7 +15,7 @@ #include #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "models/StringView.h" #include "plugin/instance/ProcessorInstance.h" diff --git a/core/unittest/processor/ProcessorParseContainerLogNativeUnittest.cpp b/core/unittest/processor/ProcessorParseContainerLogNativeUnittest.cpp index bc18692dc8..7cec1c1c9e 100644 --- a/core/unittest/processor/ProcessorParseContainerLogNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseContainerLogNativeUnittest.cpp @@ -23,7 +23,7 @@ #include "boost/utility/string_view.hpp" #include "common/Constants.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "processor/inner/ProcessorMergeMultilineLogNative.h" #include "processor/inner/ProcessorParseContainerLogNative.h" diff --git a/core/unittest/processor/ProcessorParseDelimiterNativeUnittest.cpp b/core/unittest/processor/ProcessorParseDelimiterNativeUnittest.cpp index 8bab83916a..932c0f5554 100644 --- a/core/unittest/processor/ProcessorParseDelimiterNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseDelimiterNativeUnittest.cpp @@ -15,7 +15,7 @@ #include #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "plugin/instance/ProcessorInstance.h" #include "processor/inner/ProcessorMergeMultilineLogNative.h" diff --git a/core/unittest/processor/ProcessorParseJsonNativeUnittest.cpp b/core/unittest/processor/ProcessorParseJsonNativeUnittest.cpp index ac3fd0bea7..9b9012a2a9 100644 --- a/core/unittest/processor/ProcessorParseJsonNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseJsonNativeUnittest.cpp @@ -14,7 +14,7 @@ #include #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "plugin/instance/ProcessorInstance.h" #include "processor/ProcessorParseJsonNative.h" diff --git a/core/unittest/processor/ProcessorParseRegexNativeUnittest.cpp b/core/unittest/processor/ProcessorParseRegexNativeUnittest.cpp index 60573f4caa..3ac8ee126c 100644 --- a/core/unittest/processor/ProcessorParseRegexNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseRegexNativeUnittest.cpp @@ -15,7 +15,7 @@ #include #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "plugin/instance/ProcessorInstance.h" #include "processor/ProcessorParseRegexNative.h" diff --git a/core/unittest/processor/ProcessorParseTimestampNativeUnittest.cpp b/core/unittest/processor/ProcessorParseTimestampNativeUnittest.cpp index 8c87b22de4..a78bd09487 100644 --- a/core/unittest/processor/ProcessorParseTimestampNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorParseTimestampNativeUnittest.cpp @@ -18,7 +18,7 @@ #include "common/JsonUtil.h" #include "common/TimeUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "plugin/instance/ProcessorInstance.h" #include "processor/ProcessorParseTimestampNative.h" #include "unittest/Unittest.h" diff --git a/core/unittest/processor/ProcessorSplitLogStringNativeUnittest.cpp b/core/unittest/processor/ProcessorSplitLogStringNativeUnittest.cpp index d7beadf157..40fe3069bb 100644 --- a/core/unittest/processor/ProcessorSplitLogStringNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorSplitLogStringNativeUnittest.cpp @@ -17,7 +17,7 @@ #include "common/Constants.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "processor/inner/ProcessorSplitLogStringNative.h" #include "unittest/Unittest.h" diff --git a/core/unittest/processor/ProcessorSplitMultilineLogStringNativeUnittest.cpp b/core/unittest/processor/ProcessorSplitMultilineLogStringNativeUnittest.cpp index 163f33c94a..02ef42c3e4 100644 --- a/core/unittest/processor/ProcessorSplitMultilineLogStringNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorSplitMultilineLogStringNativeUnittest.cpp @@ -15,7 +15,7 @@ #include "common/Constants.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "models/LogEvent.h" #include "processor/inner/ProcessorSplitLogStringNative.h" #include "processor/inner/ProcessorSplitMultilineLogStringNative.h" diff --git a/core/unittest/processor/ProcessorTagNativeUnittest.cpp b/core/unittest/processor/ProcessorTagNativeUnittest.cpp index 2e3f195aa2..6798ca8507 100644 --- a/core/unittest/processor/ProcessorTagNativeUnittest.cpp +++ b/core/unittest/processor/ProcessorTagNativeUnittest.cpp @@ -15,7 +15,7 @@ #include #include "common/Constants.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "config_manager/ConfigManager.h" #include "pipeline/Pipeline.h" #include "processor/inner/ProcessorTagNative.h" diff --git a/core/unittest/reader/ForceReadUnittest.cpp b/core/unittest/reader/ForceReadUnittest.cpp index d40a35fa40..812aa0da81 100644 --- a/core/unittest/reader/ForceReadUnittest.cpp +++ b/core/unittest/reader/ForceReadUnittest.cpp @@ -67,7 +67,7 @@ class ForceReadUnittest : public testing::Test { // init pipeline and config unique_ptr configJson; string configStr, errorMsg; - unique_ptr config; + unique_ptr config; unique_ptr pipeline; list::iterator que; @@ -101,7 +101,7 @@ class ForceReadUnittest : public testing::Test { APSARA_TEST_TRUE(ParseJsonTable(configStr, *configJson, errorMsg)); Json::Value inputConfigJson = (*configJson)["inputs"][0]; - config.reset(new Config(mConfigName, std::move(configJson))); + config.reset(new PipelineConfig(mConfigName, std::move(configJson))); APSARA_TEST_TRUE(config->Parse()); pipeline.reset(new Pipeline()); APSARA_TEST_TRUE(pipeline->Init(std::move(*config))); diff --git a/core/unittest/spl/SplBenchmark.cpp b/core/unittest/spl/SplBenchmark.cpp index 39d047ad92..6945e08097 100644 --- a/core/unittest/spl/SplBenchmark.cpp +++ b/core/unittest/spl/SplBenchmark.cpp @@ -15,7 +15,7 @@ #include "unittest/Unittest.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "processor/ProcessorSPL.h" #include "processor/ProcessorParseRegexNative.h" #include "processor/ProcessorParseJsonNative.h" diff --git a/core/unittest/spl/SplUnittest.cpp b/core/unittest/spl/SplUnittest.cpp index c9295d80ec..e1a2e03177 100644 --- a/core/unittest/spl/SplUnittest.cpp +++ b/core/unittest/spl/SplUnittest.cpp @@ -15,7 +15,7 @@ #include "unittest/Unittest.h" #include "common/JsonUtil.h" -#include "config/Config.h" +#include "config/PipelineConfig.h" #include "processor/ProcessorSPL.h" #include "models/LogEvent.h" #include "plugin/instance/ProcessorInstance.h"