diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ed36b6..4dc75c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,9 @@ jobs: libssl-dev \ libgrpc++-dev \ libprotobuf-dev \ + libabsl-dev \ + libre2-dev \ + libupb-dev \ protobuf-compiler-grpc - name: Download NGINX source diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f866374 --- /dev/null +++ b/.gitignore @@ -0,0 +1,197 @@ +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# CMake +CMakeCache.txt +CMakeFiles/ +CMakeScripts/ +Testing/ +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake + +# Build directories +build/ +Build/ +BUILD/ +debug/ +Debug/ +release/ +Release/ +bin/ +obj/ +out/ + +# Qt +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h +*.qmlc +*.jsc +Makefile* +*build-* + +# Visual Studio +.vs/ +*.vcxproj.user +*.vcxproj.filters +*.sln.docstates +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb +ipch/ + +# Visual Studio Code +.vscode/ +*.code-workspace + +# CLion +.idea/ +cmake-build-*/ + +# Xcode +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ +*.moved-aside +*.xccheckout +*.xcscmblueprint + +# Code::Blocks +*.depend +*.layout +*.cbp + +# Dev-C++ +Makefile.win + +# Conan +conanfile.txt +conanfile.py +conandata.yml +conanbuildinfo.* +conaninfo.txt + +# vcpkg +vcpkg_installed/ + +# Package managers +node_modules/ + +# Temporary files +*.tmp +*.temp +*.swp +*.swo +*~ + +# Log files +*.log + +# Core dumps +core +core.* + +# Profiling data +gmon.out +*.prof + +# Coverage files +*.gcov +*.gcno +*.gcda +coverage/ +*.coverage + +# Valgrind +*.memcheck +*.helgrind +*.drd + +# Doxygen +html/ +latex/ +Doxyfile.bak + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Linux +*~ +.fuse_hidden* +.directory +.Trash-* +.nfs* + +# Windows +*.stackdump + +# Archives +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Backup files +*.bak +*.backup +*.old \ No newline at end of file diff --git a/README.md b/README.md index 72457b6..dff22a7 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,12 @@ These packages provide the required headers and tools to compile gRPC-based modu ```bash sudo apt install -y \ - libgrpc++-dev \ - libprotobuf-dev \ + libgrpc++-dev \ + libgrpc-dev \ + libprotobuf-dev \ + libabsl-dev \ + libre2-dev \ + libupb-dev protobuf-compiler-grpc ``` @@ -96,8 +100,7 @@ The `appguard-nginx-module` introduces custom directives that can be used in the | `appguard_enabled` | `appguard_enabled on \| off` | `off` | Enables or disables AppGuard processing for requests. When enabled, HTTP requests will be evaluated by the AppGuard service. | | `appguard_tls` | `appguard_tls on \| off` | `off` | Enables or disables TLS (Transport Layer Security) for gRPC communication with the backend server. When enabled, all communication with the backend will be encrypted. | | `appguard_server_addr` | `appguard_server_addr :` | `""` | Specifies the address of the gRPC backend server that handles policy decisions. Default is empty, meaning no server is defined until configured. | -| `appguard_app_id` | `appguard_app_id ` | `""` | A unique identifier for your application used for authentication or tracking purposes with the backend server. | -| `appguard_app_secret` | `appguard_app_secret ` | `""` | A secret key associated with the `appguard_app_id` used for authentication with the backend server. | +| `appguard_installation_code` | `appguard_installation_code ` | `""` | Installation code obtained from the NullNet portal. Used for authenticating and authorizing the agent with the backend server. | | `appguard_default_policy`| `appguard_default_policy ` | `deny` | Defines the default policy when no explicit rule matches the request. If set to `allow`, requests that don't match any rules will be allowed; otherwise, they are denied. | | `appguard_server_cert_path` | `appguard_server_cert_path ` | `""` | Specifies the file path to the server's certificate (e.g., CA certificate) used for TLS verification when `appguard_tls` is enabled. If left empty, the system's default root CAs will be used for verification. | @@ -111,8 +114,7 @@ http { appguard_enabled on; appguard_server_addr localhost:50051; - appguard_app_id qwerty; - appguard_app_secret ytrewq; + appguard_installation_code CODE; appguard_tls on; appguard_default_policy allow; appguard_server_cert_path /path/to/ca.pem; diff --git a/config b/config index 598f703..7407a66 100644 --- a/config +++ b/config @@ -1,25 +1,31 @@ ngx_addon_name=appguard_nginx_module NGX_APPGUARD_SRCS=" \ - $ngx_addon_dir/src/appguard.pb.cc \ - $ngx_addon_dir/src/appguard.grpc.pb.cc \ + $ngx_addon_dir/src/generated/appguard.pb.cc \ + $ngx_addon_dir/src/generated/appguard.grpc.pb.cc \ + $ngx_addon_dir/src/generated/commands.pb.cc \ + $ngx_addon_dir/src/generated/commands.grpc.pb.cc \ $ngx_addon_dir/src/appguard.inner.utils.cpp \ $ngx_addon_dir/src/appguard.wrapper.cpp \ $ngx_addon_dir/src/appguard.stream.cpp \ $ngx_addon_dir/src/appguard.tcp.ucache.cpp \ $ngx_addon_dir/src/appguard.uclient.info.cpp \ $ngx_addon_dir/src/appguard.uclient.exception.cpp \ + $ngx_addon_dir/src/appguard.storage.cpp \ $ngx_addon_dir/src/appguard.nginx.module.cpp \ " NGX_APPGUARD_DEPS=" \ + $ngx_addon_dir/src/generated/appguard.pb.h \ + $ngx_addon_dir/src/generated/appguard.grpc.pb.h \ + $ngx_addon_dir/src/generated/commands.pb.h \ + $ngx_addon_dir/src/generated/commands.grpc.pb.h \ $ngx_addon_dir/src/appguard.nginx.module.hpp \ $ngx_addon_dir/src/appguard.wrapper.hpp \ $ngx_addon_dir/src/appguard.inner.utils.hpp \ - $ngx_addon_dir/src/appguard.grpc.pb.h \ - $ngx_addon_dir/src/appguard.pb.h \ $ngx_addon_dir/src/appguard.stream.hpp \ $ngx_addon_dir/src/appguard.tcp.ucache.hpp \ $ngx_addon_dir/src/appguard.uclient.info.hpp \ + $ngx_addon_dir/src/appguard.storage.hpp \ $ngx_addon_dir/src/appguard.uclient.exception.hpp \ " diff --git a/proto/appguard.proto b/proto/appguard.proto index 1e51faf..bd795a4 100644 --- a/proto/appguard.proto +++ b/proto/appguard.proto @@ -2,9 +2,15 @@ syntax = "proto3"; package appguard; +import "google/protobuf/empty.proto"; +import "commands.proto"; + service AppGuard { - // Authentication - rpc Heartbeat (HeartbeatRequest) returns (stream HeartbeatResponse); + // Control channel + rpc ControlChannel(stream appguard_commands.ClientMessage) + returns (stream appguard_commands.ServerMessage); + // Logs + rpc HandleLogs (Logs) returns (google.protobuf.Empty); // TCP rpc HandleTcpConnection (AppGuardTcpConnection) returns (AppGuardTcpResponse); // HTTP @@ -13,26 +19,20 @@ service AppGuard { // SMTP rpc HandleSmtpRequest (AppGuardSmtpRequest) returns (AppGuardResponse); rpc HandleSmtpResponse (AppGuardSmtpResponse) returns (AppGuardResponse); + // Other + rpc FirewallDefaultsRequest (Token) returns (appguard_commands.FirewallDefaults); } -// Authentication ------------------------------------------------------------------------------------------------------ - -message HeartbeatRequest { - string app_id = 1; - string app_secret = 2; +// Logs ---------------------------------------------------------------------------------------------------------------- +message Logs { + string token = 1; + repeated Log logs = 3; } -enum DeviceStatus { - DRAFT = 0; - ACTIVE = 1; - ARCHIVED = 2; - DELETED = 3; - DS_UNKNOWN = 4; -} - -message HeartbeatResponse { - string token = 1; - DeviceStatus status = 2; +message Log { + string timestamp = 1; + string level = 2; + string message = 3; } // TCP ----------------------------------------------------------------------------------------------------------------- @@ -102,15 +102,15 @@ message AppGuardSmtpResponse { // Response ------------------------------------------------------------------------------------------------------------ message AppGuardResponse { - FirewallPolicy policy = 2; + appguard_commands.FirewallPolicy policy = 2; } message AppGuardTcpResponse { AppGuardTcpInfo tcp_info = 1; } -enum FirewallPolicy { - UNKNOWN = 0; - ALLOW = 1; - DENY = 2; -} +// Other -------------------------------------------------------------------------------------- + +message Token { + string token = 1; +} \ No newline at end of file diff --git a/proto/commands.proto b/proto/commands.proto new file mode 100644 index 0000000..98ef0ac --- /dev/null +++ b/proto/commands.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +package appguard_commands; + +import "google/protobuf/empty.proto"; + +message AuthorizationRequest { + string uuid = 1; + string code = 2; + string category = 3; + string type = 4; + string target_os = 5; +} + +message Authentication { + string app_id = 1; + string app_secret = 2; +} + +message ClientMessage { + oneof message { + AuthorizationRequest authorization_request = 1; + Authentication authentication = 2; + } +} + +message AuthenticationData { + optional string app_id = 1; + optional string app_secret = 2; +} + +message ServerMessage { + oneof message { + string update_token_command = 1; + + FirewallDefaults set_firewall_defaults = 2; + + google.protobuf.Empty heartbeat = 3; + + AuthenticationData device_authorized = 4; + google.protobuf.Empty device_deauthorized = 5; + google.protobuf.Empty authorization_rejected = 6; + } +} + +message FirewallDefaults { + uint32 timeout = 1; + FirewallPolicy policy = 2; +} + +enum FirewallPolicy { + UNKNOWN = 0; + ALLOW = 1; + DENY = 2; +} \ No newline at end of file diff --git a/proto/generate.sh b/proto/generate.sh index 0d8dbe1..62162d2 100755 --- a/proto/generate.sh +++ b/proto/generate.sh @@ -3,15 +3,19 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -PROTO_FILE="$SCRIPT_DIR/appguard.proto" -OUT_DIR="$SCRIPT_DIR/../src/" +OUT_DIR="$SCRIPT_DIR/../src/generated" PROTOC_GEN_GRPC_CPP=$(which grpc_cpp_plugin) -protoc -I "$SCRIPT_DIR" \ - --cpp_out="$OUT_DIR" \ - --grpc_out="$OUT_DIR" \ +PROTO_FILES=( + "$SCRIPT_DIR/appguard.proto" + "$SCRIPT_DIR/commands.proto" +) + +protoc -I "$SCRIPT_DIR" \ + --cpp_out="$OUT_DIR" \ + --grpc_out="$OUT_DIR" \ --plugin=protoc-gen-grpc="$PROTOC_GEN_GRPC_CPP" \ - "$PROTO_FILE" + --experimental_allow_proto3_optional \ + "${PROTO_FILES[@]}" -echo "✅ C++ and gRPC code generated in: $OUT_DIR" +echo "✅ C++ and gRPC code generated in: $OUT_DIR" \ No newline at end of file diff --git a/src/appguard.grpc.pb.cc b/src/appguard.grpc.pb.cc deleted file mode 100644 index dfef9a7..0000000 --- a/src/appguard.grpc.pb.cc +++ /dev/null @@ -1,289 +0,0 @@ -// Generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: appguard.proto - -#include "appguard.pb.h" -#include "appguard.grpc.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -namespace appguard { - -static const char* AppGuard_method_names[] = { - "/appguard.AppGuard/Heartbeat", - "/appguard.AppGuard/HandleTcpConnection", - "/appguard.AppGuard/HandleHttpRequest", - "/appguard.AppGuard/HandleHttpResponse", - "/appguard.AppGuard/HandleSmtpRequest", - "/appguard.AppGuard/HandleSmtpResponse", -}; - -std::unique_ptr< AppGuard::Stub> AppGuard::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { - (void)options; - std::unique_ptr< AppGuard::Stub> stub(new AppGuard::Stub(channel, options)); - return stub; -} - -AppGuard::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) - : channel_(channel), rpcmethod_Heartbeat_(AppGuard_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) - , rpcmethod_HandleTcpConnection_(AppGuard_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HandleHttpRequest_(AppGuard_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HandleHttpResponse_(AppGuard_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HandleSmtpRequest_(AppGuard_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HandleSmtpResponse_(AppGuard_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - {} - -::grpc::ClientReader< ::appguard::HeartbeatResponse>* AppGuard::Stub::HeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request) { - return ::grpc::internal::ClientReaderFactory< ::appguard::HeartbeatResponse>::Create(channel_.get(), rpcmethod_Heartbeat_, context, request); -} - -void AppGuard::Stub::async::Heartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest* request, ::grpc::ClientReadReactor< ::appguard::HeartbeatResponse>* reactor) { - ::grpc::internal::ClientCallbackReaderFactory< ::appguard::HeartbeatResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Heartbeat_, context, request, reactor); -} - -::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>* AppGuard::Stub::AsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderFactory< ::appguard::HeartbeatResponse>::Create(channel_.get(), cq, rpcmethod_Heartbeat_, context, request, true, tag); -} - -::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>* AppGuard::Stub::PrepareAsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderFactory< ::appguard::HeartbeatResponse>::Create(channel_.get(), cq, rpcmethod_Heartbeat_, context, request, false, nullptr); -} - -::grpc::Status AppGuard::Stub::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HandleTcpConnection_, context, request, response); -} - -void AppGuard::Stub::async::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, std::move(f)); -} - -void AppGuard::Stub::async::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AppGuard::Stub::PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::appguard::AppGuardTcpResponse, ::appguard::AppGuardTcpConnection, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HandleTcpConnection_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AppGuard::Stub::AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncHandleTcpConnectionRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status AppGuard::Stub::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HandleHttpRequest_, context, request, response); -} - -void AppGuard::Stub::async::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, std::move(f)); -} - -void AppGuard::Stub::async::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::appguard::AppGuardResponse, ::appguard::AppGuardHttpRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HandleHttpRequest_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncHandleHttpRequestRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status AppGuard::Stub::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HandleHttpResponse_, context, request, response); -} - -void AppGuard::Stub::async::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, std::move(f)); -} - -void AppGuard::Stub::async::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::appguard::AppGuardResponse, ::appguard::AppGuardHttpResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HandleHttpResponse_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncHandleHttpResponseRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status AppGuard::Stub::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HandleSmtpRequest_, context, request, response); -} - -void AppGuard::Stub::async::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, std::move(f)); -} - -void AppGuard::Stub::async::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::appguard::AppGuardResponse, ::appguard::AppGuardSmtpRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HandleSmtpRequest_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncHandleSmtpRequestRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::Status AppGuard::Stub::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HandleSmtpResponse_, context, request, response); -} - -void AppGuard::Stub::async::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, std::move(f)); -} - -void AppGuard::Stub::async::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::appguard::AppGuardResponse, ::appguard::AppGuardSmtpResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HandleSmtpResponse_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncHandleSmtpResponseRaw(context, request, cq); - result->StartCall(); - return result; -} - -AppGuard::Service::Service() { - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[0], - ::grpc::internal::RpcMethod::SERVER_STREAMING, - new ::grpc::internal::ServerStreamingHandler< AppGuard::Service, ::appguard::HeartbeatRequest, ::appguard::HeartbeatResponse>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::HeartbeatRequest* req, - ::grpc::ServerWriter<::appguard::HeartbeatResponse>* writer) { - return service->Heartbeat(ctx, req, writer); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[1], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::AppGuardTcpConnection* req, - ::appguard::AppGuardTcpResponse* resp) { - return service->HandleTcpConnection(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[2], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::AppGuardHttpRequest* req, - ::appguard::AppGuardResponse* resp) { - return service->HandleHttpRequest(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[3], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::AppGuardHttpResponse* req, - ::appguard::AppGuardResponse* resp) { - return service->HandleHttpResponse(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[4], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::AppGuardSmtpRequest* req, - ::appguard::AppGuardResponse* resp) { - return service->HandleSmtpRequest(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - AppGuard_method_names[5], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](AppGuard::Service* service, - ::grpc::ServerContext* ctx, - const ::appguard::AppGuardSmtpResponse* req, - ::appguard::AppGuardResponse* resp) { - return service->HandleSmtpResponse(ctx, req, resp); - }, this))); -} - -AppGuard::Service::~Service() { -} - -::grpc::Status AppGuard::Service::Heartbeat(::grpc::ServerContext* context, const ::appguard::HeartbeatRequest* request, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* writer) { - (void) context; - (void) request; - (void) writer; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status AppGuard::Service::HandleTcpConnection(::grpc::ServerContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status AppGuard::Service::HandleHttpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status AppGuard::Service::HandleHttpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status AppGuard::Service::HandleSmtpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status AppGuard::Service::HandleSmtpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - - -} // namespace appguard - diff --git a/src/appguard.grpc.pb.h b/src/appguard.grpc.pb.h deleted file mode 100644 index 2ca1f0f..0000000 --- a/src/appguard.grpc.pb.h +++ /dev/null @@ -1,1036 +0,0 @@ -// Generated by the gRPC C++ plugin. -// If you make any local change, they will be lost. -// source: appguard.proto -#ifndef GRPC_appguard_2eproto__INCLUDED -#define GRPC_appguard_2eproto__INCLUDED - -#include "appguard.pb.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace appguard { - -class AppGuard final { - public: - static constexpr char const* service_full_name() { - return "appguard.AppGuard"; - } - class StubInterface { - public: - virtual ~StubInterface() {} - // Authentication - std::unique_ptr< ::grpc::ClientReaderInterface< ::appguard::HeartbeatResponse>> Heartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request) { - return std::unique_ptr< ::grpc::ClientReaderInterface< ::appguard::HeartbeatResponse>>(HeartbeatRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>> AsyncHeartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>>(AsyncHeartbeatRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>> PrepareAsyncHeartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>>(PrepareAsyncHeartbeatRaw(context, request, cq)); - } - // TCP - virtual ::grpc::Status HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>> AsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>>(AsyncHandleTcpConnectionRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>> PrepareAsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>>(PrepareAsyncHandleTcpConnectionRaw(context, request, cq)); - } - // HTTP - virtual ::grpc::Status HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleHttpRequestRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpRequestRaw(context, request, cq)); - } - virtual ::grpc::Status HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleHttpResponseRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpResponseRaw(context, request, cq)); - } - // SMTP - virtual ::grpc::Status HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleSmtpRequestRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpRequestRaw(context, request, cq)); - } - virtual ::grpc::Status HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleSmtpResponseRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpResponseRaw(context, request, cq)); - } - class async_interface { - public: - virtual ~async_interface() {} - // Authentication - virtual void Heartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest* request, ::grpc::ClientReadReactor< ::appguard::HeartbeatResponse>* reactor) = 0; - // TCP - virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function) = 0; - virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - // HTTP - virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function) = 0; - virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function) = 0; - virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - // SMTP - virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function) = 0; - virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function) = 0; - virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - }; - typedef class async_interface experimental_async_interface; - virtual class async_interface* async() { return nullptr; } - class async_interface* experimental_async() { return async(); } - private: - virtual ::grpc::ClientReaderInterface< ::appguard::HeartbeatResponse>* HeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>* AsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::appguard::HeartbeatResponse>* PrepareAsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>* AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>* PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) = 0; - }; - class Stub final : public StubInterface { - public: - Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - std::unique_ptr< ::grpc::ClientReader< ::appguard::HeartbeatResponse>> Heartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request) { - return std::unique_ptr< ::grpc::ClientReader< ::appguard::HeartbeatResponse>>(HeartbeatRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>> AsyncHeartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>>(AsyncHeartbeatRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>> PrepareAsyncHeartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>>(PrepareAsyncHeartbeatRaw(context, request, cq)); - } - ::grpc::Status HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>> AsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>>(AsyncHandleTcpConnectionRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>> PrepareAsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>>(PrepareAsyncHandleTcpConnectionRaw(context, request, cq)); - } - ::grpc::Status HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleHttpRequestRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpRequestRaw(context, request, cq)); - } - ::grpc::Status HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleHttpResponseRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpResponseRaw(context, request, cq)); - } - ::grpc::Status HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleSmtpRequestRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpRequestRaw(context, request, cq)); - } - ::grpc::Status HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleSmtpResponseRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpResponseRaw(context, request, cq)); - } - class async final : - public StubInterface::async_interface { - public: - void Heartbeat(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest* request, ::grpc::ClientReadReactor< ::appguard::HeartbeatResponse>* reactor) override; - void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function) override; - void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function) override; - void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function) override; - void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function) override; - void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function) override; - void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - private: - friend class Stub; - explicit async(Stub* stub): stub_(stub) { } - Stub* stub() { return stub_; } - Stub* stub_; - }; - class async* async() override { return &async_stub_; } - - private: - std::shared_ptr< ::grpc::ChannelInterface> channel_; - class async async_stub_{this}; - ::grpc::ClientReader< ::appguard::HeartbeatResponse>* HeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request) override; - ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>* AsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReader< ::appguard::HeartbeatResponse>* PrepareAsyncHeartbeatRaw(::grpc::ClientContext* context, const ::appguard::HeartbeatRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) override; - const ::grpc::internal::RpcMethod rpcmethod_Heartbeat_; - const ::grpc::internal::RpcMethod rpcmethod_HandleTcpConnection_; - const ::grpc::internal::RpcMethod rpcmethod_HandleHttpRequest_; - const ::grpc::internal::RpcMethod rpcmethod_HandleHttpResponse_; - const ::grpc::internal::RpcMethod rpcmethod_HandleSmtpRequest_; - const ::grpc::internal::RpcMethod rpcmethod_HandleSmtpResponse_; - }; - static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - - class Service : public ::grpc::Service { - public: - Service(); - virtual ~Service(); - // Authentication - virtual ::grpc::Status Heartbeat(::grpc::ServerContext* context, const ::appguard::HeartbeatRequest* request, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* writer); - // TCP - virtual ::grpc::Status HandleTcpConnection(::grpc::ServerContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response); - // HTTP - virtual ::grpc::Status HandleHttpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response); - virtual ::grpc::Status HandleHttpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response); - // SMTP - virtual ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response); - virtual ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response); - }; - template - class WithAsyncMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Heartbeat() { - ::grpc::Service::MarkMethodAsync(0); - } - ~WithAsyncMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHeartbeat(::grpc::ServerContext* context, ::appguard::HeartbeatRequest* request, ::grpc::ServerAsyncWriter< ::appguard::HeartbeatResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodAsync(1); - } - ~WithAsyncMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleTcpConnection(::grpc::ServerContext* context, ::appguard::AppGuardTcpConnection* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardTcpResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodAsync(2); - } - ~WithAsyncMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleHttpRequest(::grpc::ServerContext* context, ::appguard::AppGuardHttpRequest* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodAsync(3); - } - ~WithAsyncMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleHttpResponse(::grpc::ServerContext* context, ::appguard::AppGuardHttpResponse* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodAsync(4); - } - ~WithAsyncMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleSmtpRequest(::grpc::ServerContext* context, ::appguard::AppGuardSmtpRequest* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodAsync(5); - } - ~WithAsyncMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleSmtpResponse(::grpc::ServerContext* context, ::appguard::AppGuardSmtpResponse* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_Heartbeat > > > > > AsyncService; - template - class WithCallbackMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Heartbeat() { - ::grpc::Service::MarkMethodCallback(0, - new ::grpc::internal::CallbackServerStreamingHandler< ::appguard::HeartbeatRequest, ::appguard::HeartbeatResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::HeartbeatRequest* request) { return this->Heartbeat(context, request); })); - } - ~WithCallbackMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::appguard::HeartbeatResponse>* Heartbeat( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/) { return nullptr; } - }; - template - class WithCallbackMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response) { return this->HandleTcpConnection(context, request, response); }));} - void SetMessageAllocatorFor_HandleTcpConnection( - ::grpc::MessageAllocator< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); - static_cast<::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleTcpConnection( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response) { return this->HandleHttpRequest(context, request, response); }));} - void SetMessageAllocatorFor_HandleHttpRequest( - ::grpc::MessageAllocator< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); - static_cast<::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleHttpRequest( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response) { return this->HandleHttpResponse(context, request, response); }));} - void SetMessageAllocatorFor_HandleHttpResponse( - ::grpc::MessageAllocator< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); - static_cast<::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleHttpResponse( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response) { return this->HandleSmtpRequest(context, request, response); }));} - void SetMessageAllocatorFor_HandleSmtpRequest( - ::grpc::MessageAllocator< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); - static_cast<::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleSmtpRequest( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response) { return this->HandleSmtpResponse(context, request, response); }));} - void SetMessageAllocatorFor_HandleSmtpResponse( - ::grpc::MessageAllocator< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); - static_cast<::grpc::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleSmtpResponse( - ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) { return nullptr; } - }; - typedef WithCallbackMethod_Heartbeat > > > > > CallbackService; - typedef CallbackService ExperimentalCallbackService; - template - class WithGenericMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Heartbeat() { - ::grpc::Service::MarkMethodGeneric(0); - } - ~WithGenericMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodGeneric(1); - } - ~WithGenericMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodGeneric(3); - } - ~WithGenericMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodGeneric(4); - } - ~WithGenericMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodGeneric(5); - } - ~WithGenericMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithRawMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Heartbeat() { - ::grpc::Service::MarkMethodRaw(0); - } - ~WithRawMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHeartbeat(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodRaw(1); - } - ~WithRawMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleTcpConnection(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodRaw(2); - } - ~WithRawMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleHttpRequest(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodRaw(3); - } - ~WithRawMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleHttpResponse(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodRaw(4); - } - ~WithRawMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleSmtpRequest(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodRaw(5); - } - ~WithRawMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestHandleSmtpResponse(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawCallbackMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Heartbeat() { - ::grpc::Service::MarkMethodRawCallback(0, - new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->Heartbeat(context, request); })); - } - ~WithRawCallbackMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Heartbeat( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodRawCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleTcpConnection(context, request, response); })); - } - ~WithRawCallbackMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleTcpConnection( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodRawCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleHttpRequest(context, request, response); })); - } - ~WithRawCallbackMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleHttpRequest( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodRawCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleHttpResponse(context, request, response); })); - } - ~WithRawCallbackMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleHttpResponse( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodRawCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleSmtpRequest(context, request, response); })); - } - ~WithRawCallbackMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleSmtpRequest( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodRawCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleSmtpResponse(context, request, response); })); - } - ~WithRawCallbackMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* HandleSmtpResponse( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithStreamedUnaryMethod_HandleTcpConnection : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_HandleTcpConnection() { - ::grpc::Service::MarkMethodStreamed(1, - new ::grpc::internal::StreamedUnaryHandler< - ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>* streamer) { - return this->StreamedHandleTcpConnection(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_HandleTcpConnection() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedHandleTcpConnection(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardTcpConnection,::appguard::AppGuardTcpResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_HandleHttpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_HandleHttpRequest() { - ::grpc::Service::MarkMethodStreamed(2, - new ::grpc::internal::StreamedUnaryHandler< - ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>* streamer) { - return this->StreamedHandleHttpRequest(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_HandleHttpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedHandleHttpRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardHttpRequest,::appguard::AppGuardResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_HandleHttpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_HandleHttpResponse() { - ::grpc::Service::MarkMethodStreamed(3, - new ::grpc::internal::StreamedUnaryHandler< - ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>* streamer) { - return this->StreamedHandleHttpResponse(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_HandleHttpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedHandleHttpResponse(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardHttpResponse,::appguard::AppGuardResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_HandleSmtpRequest : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_HandleSmtpRequest() { - ::grpc::Service::MarkMethodStreamed(4, - new ::grpc::internal::StreamedUnaryHandler< - ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>* streamer) { - return this->StreamedHandleSmtpRequest(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_HandleSmtpRequest() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedHandleSmtpRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardSmtpRequest,::appguard::AppGuardResponse>* server_unary_streamer) = 0; - }; - template - class WithStreamedUnaryMethod_HandleSmtpResponse : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_HandleSmtpResponse() { - ::grpc::Service::MarkMethodStreamed(5, - new ::grpc::internal::StreamedUnaryHandler< - ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>* streamer) { - return this->StreamedHandleSmtpResponse(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_HandleSmtpResponse() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedHandleSmtpResponse(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardSmtpResponse,::appguard::AppGuardResponse>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_HandleTcpConnection > > > > StreamedUnaryService; - template - class WithSplitStreamingMethod_Heartbeat : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithSplitStreamingMethod_Heartbeat() { - ::grpc::Service::MarkMethodStreamed(0, - new ::grpc::internal::SplitServerStreamingHandler< - ::appguard::HeartbeatRequest, ::appguard::HeartbeatResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerSplitStreamer< - ::appguard::HeartbeatRequest, ::appguard::HeartbeatResponse>* streamer) { - return this->StreamedHeartbeat(context, - streamer); - })); - } - ~WithSplitStreamingMethod_Heartbeat() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, const ::appguard::HeartbeatRequest* /*request*/, ::grpc::ServerWriter< ::appguard::HeartbeatResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with split streamed - virtual ::grpc::Status StreamedHeartbeat(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::appguard::HeartbeatRequest,::appguard::HeartbeatResponse>* server_split_streamer) = 0; - }; - typedef WithSplitStreamingMethod_Heartbeat SplitStreamedService; - typedef WithSplitStreamingMethod_Heartbeat > > > > > StreamedService; -}; - -} // namespace appguard - - -#endif // GRPC_appguard_2eproto__INCLUDED diff --git a/src/appguard.inner.utils.cpp b/src/appguard.inner.utils.cpp index ddc408c..66bb04d 100644 --- a/src/appguard.inner.utils.cpp +++ b/src/appguard.inner.utils.cpp @@ -1,9 +1,17 @@ #include "appguard.inner.utils.hpp" +#include "appguard.uclient.exception.hpp" #include #include #include #include +#include + +#ifdef __FreeBSD__ +#include +#include +#include +#endif namespace appguard::inner_utils { @@ -148,7 +156,7 @@ namespace appguard::inner_utils auto query_params = ParseQueryParameters(uri); for (const auto &[key, value] : query_params) { - http_request.mutable_query()->try_emplace(key, value); + http_request.mutable_query()->insert({key, value}); } http_request.set_original_url(uri); @@ -156,7 +164,7 @@ namespace appguard::inner_utils auto headers = NgxParseRequestHeaders(request); for (const auto &[key, value] : headers) { - http_request.mutable_headers()->try_emplace(key, value); + http_request.mutable_headers()->insert({key, value}); } std::string method = NgxStringToStdString(&request->method_name); @@ -166,7 +174,7 @@ namespace appguard::inner_utils return http_request; } - appguard::AppGuardHttpResponse ExtractHttpResponseInfo(ngx_http_request_t *request) + appguard::AppGuardHttpResponse ExtractHttpResponseInfo(ngx_http_request_t *request) { appguard::AppGuardHttpResponse http_response; @@ -174,7 +182,7 @@ namespace appguard::inner_utils for (const auto &[key, value] : headers) { - http_response.mutable_headers()->try_emplace(key, value); + http_response.mutable_headers()->insert({key, value}); } http_response.set_code(request->headers_out.status); @@ -182,15 +190,101 @@ namespace appguard::inner_utils return http_response; } - appguard::FirewallPolicy StringToFirewallPolicy(const std::string &str) + appguard_commands::FirewallPolicy StringToFirewallPolicy(const std::string &str) { auto lowercase = str; std::transform(lowercase.begin(), lowercase.end(), lowercase.begin(), [](unsigned char c) { return static_cast(std::tolower(c)); }); if (lowercase == "allow") - return appguard::FirewallPolicy::ALLOW; + return appguard_commands::FirewallPolicy::ALLOW; else - return appguard::FirewallPolicy::DENY; + return appguard_commands::FirewallPolicy::DENY; + } + + std::string GetSystemUUID() + { +#if defined(__linux__) + auto readFile = [](const std::string &path) -> std::optional + { + std::ifstream file(path); + + if (!file.is_open()) + { + return {}; + } + + std::string content; + std::getline(file, content); + file.close(); + + content.erase(0, content.find_first_not_of(" \t\n\r")); + content.erase(content.find_last_not_of(" \t\n\r") + 1); + + return {content}; + }; + + if (auto uuid = readFile("/sys/class/dmi/id/product_uuid"); uuid.has_value()) + { + return uuid.value(); + } + + if (auto uuid = readFile("/etc/machine-id"); uuid.has_value() && uuid.value().length() == 32) + { + return uuid.value().substr(0, 8) + "-" + + uuid.value().substr(8, 4) + "-" + + uuid.value().substr(12, 4) + "-" + + uuid.value().substr(16, 4) + "-" + + uuid.value().substr(20, 12); + } + + if (auto uuid = readFile("/var/lib/dbus/machine-id"); uuid.has_value() && uuid.value().length() == 32) + { + return uuid.value().substr(0, 8) + "-" + + uuid.value().substr(8, 4) + "-" + + uuid.value().substr(12, 4) + "-" + + uuid.value().substr(16, 4) + "-" + + uuid.value().substr(20, 12); + } + + throw AppGuardClientException::FromCustomCode(AppGuardStatusCode::APPGUARD_FAILED_TO_OBTAIN_UUID); + +#elif defined(__FreeBSD__) + char uuid[64]; + size_t len; + + len = sizeof(uuid); + if (sysctlbyname("kern.hostuuid", uuid, &len, nullptr, 0) == 0) + { + return std::string(uuid); + } + + len = sizeof(uuid); + if (sysctlbyname("smbios.system.uuid", uuid, &len, nullptr, 0) == 0) + { + return std::string(uuid); + } + + throw AppGuardClientException::FromCustomCode(AppGuardStatusCode::APPGUARD_FAILED_TO_OBTAIN_UUID); +#else +#error "GetSystemUUID function is not implemented for current platform" +#endif + } + + std::string GetOsAsString() + { +#ifdef __FreeBSD__ + return "FreeBSD"; +#elif __linux__ + return "Linux"; +#elif __APPLE__ + return "Darwin"; +#elif _WIN32 + return "Windows"; +#elif __unix__ + return "Unix"; +#else +#error "GetOsAsString function is not implemented for current platform" +#endif } } \ No newline at end of file diff --git a/src/appguard.inner.utils.hpp b/src/appguard.inner.utils.hpp index 4dd2d90..6881e62 100644 --- a/src/appguard.inner.utils.hpp +++ b/src/appguard.inner.utils.hpp @@ -1,9 +1,9 @@ -#ifndef __APPGUARD_INNER_UTILS_H__ -#define __APPGUARD_INNER_UTILS_H__ +#pragma once #include #include #include +#include extern "C" { @@ -12,7 +12,7 @@ extern "C" #include } -#include "appguard.pb.h" +#include "generated/appguard.pb.h" namespace appguard::inner_utils { @@ -69,7 +69,26 @@ namespace appguard::inner_utils * @param str The input string representing the firewall policy. * @return The corresponding FirewallPolicy enum value. */ - appguard::FirewallPolicy StringToFirewallPolicy(const std::string &str); -} + appguard_commands::FirewallPolicy StringToFirewallPolicy(const std::string &str); + + /** + * @brief Retrieves the system's hardware UUID. + * + * This function queries the system's unique hardware identifier (UUID) + * + * @return A string containing the system UUID. + * @throws A AppGuardClientException if the retrieval fails. + */ + std::string GetSystemUUID(); -#endif \ No newline at end of file + /** + * @brief Retrieves the operating system name as a string. + * + * This function queries the system to determine the operating system type + * and returns just the OS name identifier. + * + * @return A string containing the OS name. + * Examples: "Linux", "FreeBSD", "Darwin", "Windows" + */ + std::string GetOsAsString(); +} \ No newline at end of file diff --git a/src/appguard.nginx.module.cpp b/src/appguard.nginx.module.cpp index d0bb002..7febeca 100644 --- a/src/appguard.nginx.module.cpp +++ b/src/appguard.nginx.module.cpp @@ -4,6 +4,7 @@ #include "appguard.uclient.exception.hpp" #include "appguard.uclient.info.hpp" #include "appguard.tcp.ucache.hpp" +#include "appguard.storage.hpp" static ngx_http_output_header_filter_pt next_header_filter; @@ -56,18 +57,11 @@ extern "C" offsetof(AppGuardNginxModule::Config, server_addr), nullptr}, - {ngx_string("appguard_app_id"), + {ngx_string("appguard_installation_code"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_SRV_CONF_OFFSET, - offsetof(AppGuardNginxModule::Config, app_id), - nullptr}, - - {ngx_string("appguard_app_secret"), - NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_CONF_TAKE1, - ngx_conf_set_str_slot, - NGX_HTTP_SRV_CONF_OFFSET, - offsetof(AppGuardNginxModule::Config, app_secret), + offsetof(AppGuardNginxModule::Config, installation_code), nullptr}, {ngx_string("appguard_default_policy"), @@ -114,21 +108,35 @@ extern "C" NGX_MODULE_V1_PADDING}; } -static ngx_int_t ActOnPolicy(appguard::FirewallPolicy policy, appguard::FirewallPolicy default_policy) +static ngx_int_t ActOnPolicy(appguard_commands::FirewallPolicy policy, appguard_commands::FirewallPolicy default_policy) { switch (policy) { - case appguard::FirewallPolicy::ALLOW: + case appguard_commands::FirewallPolicy::ALLOW: return NGX_DECLINED; - case appguard::FirewallPolicy::DENY: + case appguard_commands::FirewallPolicy::DENY: return NGX_HTTP_FORBIDDEN; default: - return (default_policy == appguard::FirewallPolicy::ALLOW) ? NGX_DECLINED : NGX_HTTP_FORBIDDEN; + return (default_policy == appguard_commands::FirewallPolicy::ALLOW) ? NGX_DECLINED : NGX_HTTP_FORBIDDEN; } } ngx_int_t AppGuardNginxModule::Initialize(ngx_conf_t *cf) { + try + { + Storage::Initialize(); + } + catch (...) + { + ngx_log_error( + NGX_LOG_ERR, + cf->log, + 0, + "AppGuard: Failed to initialize persistent storage"); + return NGX_ERROR; + } + auto *cmcf = static_cast( ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module)); @@ -165,11 +173,9 @@ char *AppGuardNginxModule::MergeSrvConfig(ngx_conf_t *cf, void *parent, void *ch ngx_conf_merge_value(conf->tls, prev->tls, 0); ngx_conf_merge_str_value(conf->server_addr, prev->server_addr, ""); - ngx_conf_merge_str_value(conf->app_id, prev->app_id, ""); + ngx_conf_merge_str_value(conf->installation_code, prev->installation_code, ""); - ngx_conf_merge_str_value(conf->app_secret, prev->app_secret, ""); ngx_conf_merge_str_value(conf->default_policy, prev->default_policy, ""); - ngx_conf_merge_str_value(conf->server_cert_path, prev->server_cert_path, ""); return NGX_CONF_OK; @@ -183,28 +189,26 @@ ngx_int_t AppGuardNginxModule::RequestHandler(ngx_http_request_t *request) auto default_policy_str = appguard::inner_utils::NgxStringToStdString(&conf->default_policy); auto default_policy = appguard::inner_utils::StringToFirewallPolicy(default_policy_str); - auto app_id = appguard::inner_utils::NgxStringToStdString(&conf->app_id); - auto app_secret = appguard::inner_utils::NgxStringToStdString(&conf->app_secret); + auto installation_code = appguard::inner_utils::NgxStringToStdString(&conf->installation_code); auto server_addr = appguard::inner_utils::NgxStringToStdString(&conf->server_addr); auto server_cert_path = appguard::inner_utils::NgxStringToStdString(&conf->server_cert_path); - if (app_id.empty() || app_secret.empty()) + if (installation_code.empty()) { ngx_log_error( NGX_LOG_ERR, request->connection->log, 0, - "AppGuard: App Id and/or App Secret haven't been set; falling back to default policy '%s'", + "AppGuard: Installation Code hasn't been set; falling back to default policy '%s'", default_policy_str.data()); - return ActOnPolicy(appguard::FirewallPolicy::UNKNOWN, default_policy); + return ActOnPolicy(appguard_commands::FirewallPolicy::UNKNOWN, default_policy); } try { - AppGaurdClientInfo client_info{ - .app_id = app_id, - .app_secret = app_secret, + AppGaurdClientInfo client_info { + .installation_code = installation_code, .server_addr = server_addr, .server_cert_path = server_cert_path, .tls = !!conf->tls}; @@ -231,7 +235,7 @@ ngx_int_t AppGuardNginxModule::RequestHandler(ngx_http_request_t *request) ex.what(), default_policy_str.data()); - return ActOnPolicy(appguard::FirewallPolicy::UNKNOWN, default_policy); + return ActOnPolicy(appguard_commands::FirewallPolicy::UNKNOWN, default_policy); } } @@ -243,29 +247,27 @@ ngx_int_t AppGuardNginxModule::ResponseHandler(ngx_http_request_t *request) auto default_policy_str = appguard::inner_utils::NgxStringToStdString(&conf->default_policy); auto default_policy = appguard::inner_utils::StringToFirewallPolicy(default_policy_str); - auto app_id = appguard::inner_utils::NgxStringToStdString(&conf->app_id); - auto app_secret = appguard::inner_utils::NgxStringToStdString(&conf->app_secret); + auto installation_code = appguard::inner_utils::NgxStringToStdString(&conf->installation_code); auto server_addr = appguard::inner_utils::NgxStringToStdString(&conf->server_addr); auto server_cert_path = appguard::inner_utils::NgxStringToStdString(&conf->server_cert_path); - if (app_id.empty() || app_secret.empty()) + if (installation_code.empty()) { ngx_log_error( NGX_LOG_ERR, request->connection->log, 0, - "AppGuard: App Id and/or App Secret haven't been set; falling back to default policy '%s'", + "AppGuard: Installation code hasn't been set; falling back to default policy '%s'", default_policy_str.data()); - ngx_int_t code = ActOnPolicy(appguard::FirewallPolicy::UNKNOWN, default_policy); + ngx_int_t code = ActOnPolicy(appguard_commands::FirewallPolicy::UNKNOWN, default_policy); return code == NGX_DECLINED ? next_header_filter(request) : code; } try { AppGaurdClientInfo client_info{ - .app_id = app_id, - .app_secret = app_secret, + .installation_code = installation_code, .server_addr = server_addr, .server_cert_path = server_cert_path, .tls = !!conf->tls}; @@ -293,7 +295,7 @@ ngx_int_t AppGuardNginxModule::ResponseHandler(ngx_http_request_t *request) ex.what(), default_policy_str.data()); - ngx_int_t code = ActOnPolicy(appguard::FirewallPolicy::UNKNOWN, default_policy); + ngx_int_t code = ActOnPolicy(appguard_commands::FirewallPolicy::UNKNOWN, default_policy); return code == NGX_DECLINED ? next_header_filter(request) : code; } } diff --git a/src/appguard.nginx.module.hpp b/src/appguard.nginx.module.hpp index a771f5c..a58c3f3 100644 --- a/src/appguard.nginx.module.hpp +++ b/src/appguard.nginx.module.hpp @@ -1,5 +1,4 @@ -#ifndef __APPGUARD_NGINX_MODULE_HPP__ -#define __APPGUARD_NGINX_MODULE_HPP__ +#pragma once extern "C" { @@ -30,10 +29,8 @@ class AppGuardNginxModule ngx_flag_t tls = NGX_CONF_UNSET; // Address of the AppGuard server. ngx_str_t server_addr = ngx_null_string; - // App ID used for authentication with AppGuard. - ngx_str_t app_id = ngx_null_string; - // App Secret used for authentication with AppGuard. - ngx_str_t app_secret = ngx_null_string; + // NullNet installation code + ngx_str_t installation_code = ngx_null_string; // Default policy to apply when AppGuard is unreachable or misconfigured. ngx_str_t default_policy = ngx_null_string; // Path to server's certificate file. @@ -94,5 +91,3 @@ class AppGuardNginxModule */ static ngx_int_t ResponseHandler(ngx_http_request_t *request); }; - -#endif \ No newline at end of file diff --git a/src/appguard.pb.cc b/src/appguard.pb.cc deleted file mode 100644 index 03999e7..0000000 --- a/src/appguard.pb.cc +++ /dev/null @@ -1,4518 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: appguard.proto - -#include "appguard.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace appguard { -PROTOBUF_CONSTEXPR HeartbeatRequest::HeartbeatRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.app_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.app_secret_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct HeartbeatRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR HeartbeatRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~HeartbeatRequestDefaultTypeInternal() {} - union { - HeartbeatRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeartbeatRequestDefaultTypeInternal _HeartbeatRequest_default_instance_; -PROTOBUF_CONSTEXPR HeartbeatResponse::HeartbeatResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.status_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} -struct HeartbeatResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR HeartbeatResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~HeartbeatResponseDefaultTypeInternal() {} - union { - HeartbeatResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeartbeatResponseDefaultTypeInternal _HeartbeatResponse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardTcpConnection::AppGuardTcpConnection( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.source_ip_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.destination_ip_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.protocol_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.source_port_)*/0u - , /*decltype(_impl_.destination_port_)*/0u} {} -struct AppGuardTcpConnectionDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardTcpConnectionDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardTcpConnectionDefaultTypeInternal() {} - union { - AppGuardTcpConnection _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardTcpConnectionDefaultTypeInternal _AppGuardTcpConnection_default_instance_; -PROTOBUF_CONSTEXPR AppGuardIpInfo::AppGuardIpInfo( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.ip_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.country_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.asn_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.org_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.continent_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.city_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.postal_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.timezone_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.blacklist_)*/false} {} -struct AppGuardIpInfoDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardIpInfoDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardIpInfoDefaultTypeInternal() {} - union { - AppGuardIpInfo _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardIpInfoDefaultTypeInternal _AppGuardIpInfo_default_instance_; -PROTOBUF_CONSTEXPR AppGuardTcpInfo::AppGuardTcpInfo( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.connection_)*/nullptr - , /*decltype(_impl_.ip_info_)*/nullptr - , /*decltype(_impl_.tcp_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct AppGuardTcpInfoDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardTcpInfoDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardTcpInfoDefaultTypeInternal() {} - union { - AppGuardTcpInfo _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardTcpInfoDefaultTypeInternal _AppGuardTcpInfo_default_instance_; -PROTOBUF_CONSTEXPR AppGuardHttpRequest_HeadersEntry_DoNotUse::AppGuardHttpRequest_HeadersEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal() {} - union { - AppGuardHttpRequest_HeadersEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardHttpRequest_QueryEntry_DoNotUse::AppGuardHttpRequest_QueryEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal() {} - union { - AppGuardHttpRequest_QueryEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardHttpRequest::AppGuardHttpRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{::_pbi::ConstantInitialized()} - , /*decltype(_impl_.query_)*/{::_pbi::ConstantInitialized()} - , /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.original_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.method_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.body_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.tcp_info_)*/nullptr} {} -struct AppGuardHttpRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardHttpRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardHttpRequestDefaultTypeInternal() {} - union { - AppGuardHttpRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardHttpRequestDefaultTypeInternal _AppGuardHttpRequest_default_instance_; -PROTOBUF_CONSTEXPR AppGuardHttpResponse_HeadersEntry_DoNotUse::AppGuardHttpResponse_HeadersEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal() {} - union { - AppGuardHttpResponse_HeadersEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardHttpResponse::AppGuardHttpResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.headers_)*/{::_pbi::ConstantInitialized()} - , /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.tcp_info_)*/nullptr - , /*decltype(_impl_.code_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} -struct AppGuardHttpResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardHttpResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardHttpResponseDefaultTypeInternal() {} - union { - AppGuardHttpResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardHttpResponseDefaultTypeInternal _AppGuardHttpResponse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardSmtpRequest_HeadersEntry_DoNotUse::AppGuardSmtpRequest_HeadersEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal() {} - union { - AppGuardSmtpRequest_HeadersEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardSmtpRequest::AppGuardSmtpRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{::_pbi::ConstantInitialized()} - , /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.body_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.tcp_info_)*/nullptr} {} -struct AppGuardSmtpRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardSmtpRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardSmtpRequestDefaultTypeInternal() {} - union { - AppGuardSmtpRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardSmtpRequestDefaultTypeInternal _AppGuardSmtpRequest_default_instance_; -PROTOBUF_CONSTEXPR AppGuardSmtpResponse::AppGuardSmtpResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.tcp_info_)*/nullptr - , /*decltype(_impl_.code_)*/0u} {} -struct AppGuardSmtpResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardSmtpResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardSmtpResponseDefaultTypeInternal() {} - union { - AppGuardSmtpResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardSmtpResponseDefaultTypeInternal _AppGuardSmtpResponse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardResponse::AppGuardResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.policy_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} -struct AppGuardResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardResponseDefaultTypeInternal() {} - union { - AppGuardResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardResponseDefaultTypeInternal _AppGuardResponse_default_instance_; -PROTOBUF_CONSTEXPR AppGuardTcpResponse::AppGuardTcpResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.tcp_info_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct AppGuardTcpResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AppGuardTcpResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AppGuardTcpResponseDefaultTypeInternal() {} - union { - AppGuardTcpResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AppGuardTcpResponseDefaultTypeInternal _AppGuardTcpResponse_default_instance_; -} // namespace appguard -static ::_pb::Metadata file_level_metadata_appguard_2eproto[15]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_appguard_2eproto[2]; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_appguard_2eproto = nullptr; - -const uint32_t TableStruct_appguard_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatRequest, _impl_.app_id_), - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatRequest, _impl_.app_secret_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatResponse, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::HeartbeatResponse, _impl_.status_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.source_ip_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.source_port_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.destination_ip_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.destination_port_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _impl_.protocol_), - ~0u, - 0, - 2, - 1, - 3, - ~0u, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.ip_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.country_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.asn_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.org_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.continent_code_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.city_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.region_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.postal_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.timezone_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _impl_.blacklist_), - ~0u, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - ~0u, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, _impl_.connection_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, _impl_.ip_info_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, _impl_.tcp_id_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.original_url_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.headers_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.method_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.body_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.query_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _impl_.tcp_info_), - ~0u, - ~0u, - ~0u, - ~0u, - 0, - ~0u, - ~0u, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _impl_.code_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _impl_.headers_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _impl_.tcp_info_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _impl_.headers_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _impl_.body_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _impl_.tcp_info_), - ~0u, - ~0u, - 0, - ~0u, - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _impl_.token_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _impl_.code_), - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _impl_.tcp_info_), - ~0u, - 0, - ~0u, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardResponse, _impl_.policy_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpResponse, _impl_.tcp_info_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::appguard::HeartbeatRequest)}, - { 8, -1, -1, sizeof(::appguard::HeartbeatResponse)}, - { 16, 28, -1, sizeof(::appguard::AppGuardTcpConnection)}, - { 34, 50, -1, sizeof(::appguard::AppGuardIpInfo)}, - { 60, -1, -1, sizeof(::appguard::AppGuardTcpInfo)}, - { 69, 77, -1, sizeof(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse)}, - { 79, 87, -1, sizeof(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse)}, - { 89, 102, -1, sizeof(::appguard::AppGuardHttpRequest)}, - { 109, 117, -1, sizeof(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse)}, - { 119, -1, -1, sizeof(::appguard::AppGuardHttpResponse)}, - { 129, 137, -1, sizeof(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse)}, - { 139, 149, -1, sizeof(::appguard::AppGuardSmtpRequest)}, - { 153, 162, -1, sizeof(::appguard::AppGuardSmtpResponse)}, - { 165, -1, -1, sizeof(::appguard::AppGuardResponse)}, - { 172, -1, -1, sizeof(::appguard::AppGuardTcpResponse)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::appguard::_HeartbeatRequest_default_instance_._instance, - &::appguard::_HeartbeatResponse_default_instance_._instance, - &::appguard::_AppGuardTcpConnection_default_instance_._instance, - &::appguard::_AppGuardIpInfo_default_instance_._instance, - &::appguard::_AppGuardTcpInfo_default_instance_._instance, - &::appguard::_AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_._instance, - &::appguard::_AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_._instance, - &::appguard::_AppGuardHttpRequest_default_instance_._instance, - &::appguard::_AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_._instance, - &::appguard::_AppGuardHttpResponse_default_instance_._instance, - &::appguard::_AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_._instance, - &::appguard::_AppGuardSmtpRequest_default_instance_._instance, - &::appguard::_AppGuardSmtpResponse_default_instance_._instance, - &::appguard::_AppGuardResponse_default_instance_._instance, - &::appguard::_AppGuardTcpResponse_default_instance_._instance, -}; - -const char descriptor_table_protodef_appguard_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\016appguard.proto\022\010appguard\"6\n\020HeartbeatR" - "equest\022\016\n\006app_id\030\001 \001(\t\022\022\n\napp_secret\030\002 \001" - "(\t\"J\n\021HeartbeatResponse\022\r\n\005token\030\001 \001(\t\022&" - "\n\006status\030\002 \001(\0162\026.appguard.DeviceStatus\"\354" - "\001\n\025AppGuardTcpConnection\022\r\n\005token\030\001 \001(\t\022" - "\026\n\tsource_ip\030\002 \001(\tH\000\210\001\001\022\030\n\013source_port\030\003" - " \001(\rH\001\210\001\001\022\033\n\016destination_ip\030\004 \001(\tH\002\210\001\001\022\035" - "\n\020destination_port\030\005 \001(\rH\003\210\001\001\022\020\n\010protoco" - "l\030\006 \001(\tB\014\n\n_source_ipB\016\n\014_source_portB\021\n" - "\017_destination_ipB\023\n\021_destination_port\"\265\002" - "\n\016AppGuardIpInfo\022\n\n\002ip\030\001 \001(\t\022\024\n\007country\030" - "\002 \001(\tH\000\210\001\001\022\020\n\003asn\030\003 \001(\tH\001\210\001\001\022\020\n\003org\030\004 \001(" - "\tH\002\210\001\001\022\033\n\016continent_code\030\005 \001(\tH\003\210\001\001\022\021\n\004c" - "ity\030\006 \001(\tH\004\210\001\001\022\023\n\006region\030\007 \001(\tH\005\210\001\001\022\023\n\006p" - "ostal\030\010 \001(\tH\006\210\001\001\022\025\n\010timezone\030\t \001(\tH\007\210\001\001\022" - "\021\n\tblacklist\030d \001(\010B\n\n\010_countryB\006\n\004_asnB\006" - "\n\004_orgB\021\n\017_continent_codeB\007\n\005_cityB\t\n\007_r" - "egionB\t\n\007_postalB\013\n\t_timezone\"\201\001\n\017AppGua" - "rdTcpInfo\0223\n\nconnection\030\001 \001(\0132\037.appguard" - ".AppGuardTcpConnection\022)\n\007ip_info\030\002 \001(\0132" - "\030.appguard.AppGuardIpInfo\022\016\n\006tcp_id\030\003 \001(" - "\004\"\347\002\n\023AppGuardHttpRequest\022\r\n\005token\030\001 \001(\t" - "\022\024\n\014original_url\030\002 \001(\t\022;\n\007headers\030\003 \003(\0132" - "*.appguard.AppGuardHttpRequest.HeadersEn" - "try\022\016\n\006method\030\004 \001(\t\022\021\n\004body\030\005 \001(\tH\000\210\001\001\0227" - "\n\005query\030\006 \003(\0132(.appguard.AppGuardHttpReq" - "uest.QueryEntry\022+\n\010tcp_info\030d \001(\0132\031.appg" - "uard.AppGuardTcpInfo\032.\n\014HeadersEntry\022\013\n\003" - "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032,\n\nQueryEnt" - "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\007\n\005_b" - "ody\"\316\001\n\024AppGuardHttpResponse\022\r\n\005token\030\001 " - "\001(\t\022\014\n\004code\030\002 \001(\r\022<\n\007headers\030\003 \003(\0132+.app" - "guard.AppGuardHttpResponse.HeadersEntry\022" - "+\n\010tcp_info\030d \001(\0132\031.appguard.AppGuardTcp" - "Info\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - "ue\030\002 \001(\t:\0028\001\"\332\001\n\023AppGuardSmtpRequest\022\r\n\005" - "token\030\001 \001(\t\022;\n\007headers\030\002 \003(\0132*.appguard." - "AppGuardSmtpRequest.HeadersEntry\022\021\n\004body" - "\030\003 \001(\tH\000\210\001\001\022+\n\010tcp_info\030d \001(\0132\031.appguard" - ".AppGuardTcpInfo\032.\n\014HeadersEntry\022\013\n\003key\030" - "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\007\n\005_body\"n\n\024App" - "GuardSmtpResponse\022\r\n\005token\030\001 \001(\t\022\021\n\004code" - "\030\002 \001(\rH\000\210\001\001\022+\n\010tcp_info\030d \001(\0132\031.appguard" - ".AppGuardTcpInfoB\007\n\005_code\"<\n\020AppGuardRes" - "ponse\022(\n\006policy\030\002 \001(\0162\030.appguard.Firewal" - "lPolicy\"B\n\023AppGuardTcpResponse\022+\n\010tcp_in" - "fo\030\001 \001(\0132\031.appguard.AppGuardTcpInfo*P\n\014D" - "eviceStatus\022\t\n\005DRAFT\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010AR" - "CHIVED\020\002\022\013\n\007DELETED\020\003\022\016\n\nDS_UNKNOWN\020\004*2\n" - "\016FirewallPolicy\022\013\n\007UNKNOWN\020\000\022\t\n\005ALLOW\020\001\022" - "\010\n\004DENY\020\0022\355\003\n\010AppGuard\022F\n\tHeartbeat\022\032.ap" - "pguard.HeartbeatRequest\032\033.appguard.Heart" - "beatResponse0\001\022U\n\023HandleTcpConnection\022\037." - "appguard.AppGuardTcpConnection\032\035.appguar" - "d.AppGuardTcpResponse\022N\n\021HandleHttpReque" - "st\022\035.appguard.AppGuardHttpRequest\032\032.appg" - "uard.AppGuardResponse\022P\n\022HandleHttpRespo" - "nse\022\036.appguard.AppGuardHttpResponse\032\032.ap" - "pguard.AppGuardResponse\022N\n\021HandleSmtpReq" - "uest\022\035.appguard.AppGuardSmtpRequest\032\032.ap" - "pguard.AppGuardResponse\022P\n\022HandleSmtpRes" - "ponse\022\036.appguard.AppGuardSmtpResponse\032\032." - "appguard.AppGuardResponseb\006proto3" - ; -static ::_pbi::once_flag descriptor_table_appguard_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_appguard_2eproto = { - false, false, 2513, descriptor_table_protodef_appguard_2eproto, - "appguard.proto", - &descriptor_table_appguard_2eproto_once, nullptr, 0, 15, - schemas, file_default_instances, TableStruct_appguard_2eproto::offsets, - file_level_metadata_appguard_2eproto, file_level_enum_descriptors_appguard_2eproto, - file_level_service_descriptors_appguard_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_appguard_2eproto_getter() { - return &descriptor_table_appguard_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_appguard_2eproto(&descriptor_table_appguard_2eproto); -namespace appguard { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeviceStatus_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appguard_2eproto); - return file_level_enum_descriptors_appguard_2eproto[0]; -} -bool DeviceStatus_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FirewallPolicy_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_appguard_2eproto); - return file_level_enum_descriptors_appguard_2eproto[1]; -} -bool FirewallPolicy_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - - -// =================================================================== - -class HeartbeatRequest::_Internal { - public: -}; - -HeartbeatRequest::HeartbeatRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.HeartbeatRequest) -} -HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - HeartbeatRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.app_id_){} - , decltype(_impl_.app_secret_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.app_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.app_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_app_id().empty()) { - _this->_impl_.app_id_.Set(from._internal_app_id(), - _this->GetArenaForAllocation()); - } - _impl_.app_secret_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.app_secret_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_app_secret().empty()) { - _this->_impl_.app_secret_.Set(from._internal_app_secret(), - _this->GetArenaForAllocation()); - } - // @@protoc_insertion_point(copy_constructor:appguard.HeartbeatRequest) -} - -inline void HeartbeatRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.app_id_){} - , decltype(_impl_.app_secret_){} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.app_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.app_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.app_secret_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.app_secret_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -HeartbeatRequest::~HeartbeatRequest() { - // @@protoc_insertion_point(destructor:appguard.HeartbeatRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void HeartbeatRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.app_id_.Destroy(); - _impl_.app_secret_.Destroy(); -} - -void HeartbeatRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void HeartbeatRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.HeartbeatRequest) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.app_id_.ClearToEmpty(); - _impl_.app_secret_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HeartbeatRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string app_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_app_id(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.HeartbeatRequest.app_id")); - } else - goto handle_unusual; - continue; - // string app_secret = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_app_secret(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.HeartbeatRequest.app_secret")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HeartbeatRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.HeartbeatRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string app_id = 1; - if (!this->_internal_app_id().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_app_id().data(), static_cast(this->_internal_app_id().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.HeartbeatRequest.app_id"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_app_id(), target); - } - - // string app_secret = 2; - if (!this->_internal_app_secret().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_app_secret().data(), static_cast(this->_internal_app_secret().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.HeartbeatRequest.app_secret"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_app_secret(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.HeartbeatRequest) - return target; -} - -size_t HeartbeatRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.HeartbeatRequest) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string app_id = 1; - if (!this->_internal_app_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_app_id()); - } - - // string app_secret = 2; - if (!this->_internal_app_secret().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_app_secret()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeartbeatRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - HeartbeatRequest::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeartbeatRequest::GetClassData() const { return &_class_data_; } - - -void HeartbeatRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.HeartbeatRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_app_id().empty()) { - _this->_internal_set_app_id(from._internal_app_id()); - } - if (!from._internal_app_secret().empty()) { - _this->_internal_set_app_secret(from._internal_app_secret()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HeartbeatRequest::CopyFrom(const HeartbeatRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.HeartbeatRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HeartbeatRequest::IsInitialized() const { - return true; -} - -void HeartbeatRequest::InternalSwap(HeartbeatRequest* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.app_id_, lhs_arena, - &other->_impl_.app_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.app_secret_, lhs_arena, - &other->_impl_.app_secret_, rhs_arena - ); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HeartbeatRequest::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[0]); -} - -// =================================================================== - -class HeartbeatResponse::_Internal { - public: -}; - -HeartbeatResponse::HeartbeatResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.HeartbeatResponse) -} -HeartbeatResponse::HeartbeatResponse(const HeartbeatResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - HeartbeatResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.token_){} - , decltype(_impl_.status_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - _this->_impl_.status_ = from._impl_.status_; - // @@protoc_insertion_point(copy_constructor:appguard.HeartbeatResponse) -} - -inline void HeartbeatResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.token_){} - , decltype(_impl_.status_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -HeartbeatResponse::~HeartbeatResponse() { - // @@protoc_insertion_point(destructor:appguard.HeartbeatResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void HeartbeatResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.token_.Destroy(); -} - -void HeartbeatResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void HeartbeatResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.HeartbeatResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.token_.ClearToEmpty(); - _impl_.status_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HeartbeatResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.HeartbeatResponse.token")); - } else - goto handle_unusual; - continue; - // .appguard.DeviceStatus status = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_status(static_cast<::appguard::DeviceStatus>(val)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HeartbeatResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.HeartbeatResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.HeartbeatResponse.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // .appguard.DeviceStatus status = 2; - if (this->_internal_status() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_status(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.HeartbeatResponse) - return target; -} - -size_t HeartbeatResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.HeartbeatResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - // .appguard.DeviceStatus status = 2; - if (this->_internal_status() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_status()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeartbeatResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - HeartbeatResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeartbeatResponse::GetClassData() const { return &_class_data_; } - - -void HeartbeatResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.HeartbeatResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - if (from._internal_status() != 0) { - _this->_internal_set_status(from._internal_status()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HeartbeatResponse::CopyFrom(const HeartbeatResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.HeartbeatResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HeartbeatResponse::IsInitialized() const { - return true; -} - -void HeartbeatResponse::InternalSwap(HeartbeatResponse* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - swap(_impl_.status_, other->_impl_.status_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HeartbeatResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[1]); -} - -// =================================================================== - -class AppGuardTcpConnection::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_source_ip(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_source_port(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_destination_ip(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_destination_port(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } -}; - -AppGuardTcpConnection::AppGuardTcpConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpConnection) -} -AppGuardTcpConnection::AppGuardTcpConnection(const AppGuardTcpConnection& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardTcpConnection* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.source_ip_){} - , decltype(_impl_.destination_ip_){} - , decltype(_impl_.protocol_){} - , decltype(_impl_.source_port_){} - , decltype(_impl_.destination_port_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - _impl_.source_ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_source_ip()) { - _this->_impl_.source_ip_.Set(from._internal_source_ip(), - _this->GetArenaForAllocation()); - } - _impl_.destination_ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.destination_ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_destination_ip()) { - _this->_impl_.destination_ip_.Set(from._internal_destination_ip(), - _this->GetArenaForAllocation()); - } - _impl_.protocol_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.protocol_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_protocol().empty()) { - _this->_impl_.protocol_.Set(from._internal_protocol(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.source_port_, &from._impl_.source_port_, - static_cast(reinterpret_cast(&_impl_.destination_port_) - - reinterpret_cast(&_impl_.source_port_)) + sizeof(_impl_.destination_port_)); - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpConnection) -} - -inline void AppGuardTcpConnection::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.source_ip_){} - , decltype(_impl_.destination_ip_){} - , decltype(_impl_.protocol_){} - , decltype(_impl_.source_port_){0u} - , decltype(_impl_.destination_port_){0u} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.destination_ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.destination_ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.protocol_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.protocol_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardTcpConnection::~AppGuardTcpConnection() { - // @@protoc_insertion_point(destructor:appguard.AppGuardTcpConnection) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardTcpConnection::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.token_.Destroy(); - _impl_.source_ip_.Destroy(); - _impl_.destination_ip_.Destroy(); - _impl_.protocol_.Destroy(); -} - -void AppGuardTcpConnection::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardTcpConnection::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpConnection) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.token_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _impl_.source_ip_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.destination_ip_.ClearNonDefaultToEmpty(); - } - } - _impl_.protocol_.ClearToEmpty(); - if (cached_has_bits & 0x0000000cu) { - ::memset(&_impl_.source_port_, 0, static_cast( - reinterpret_cast(&_impl_.destination_port_) - - reinterpret_cast(&_impl_.source_port_)) + sizeof(_impl_.destination_port_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardTcpConnection::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardTcpConnection.token")); - } else - goto handle_unusual; - continue; - // optional string source_ip = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_source_ip(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardTcpConnection.source_ip")); - } else - goto handle_unusual; - continue; - // optional uint32 source_port = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_source_port(&has_bits); - _impl_.source_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional string destination_ip = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_destination_ip(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardTcpConnection.destination_ip")); - } else - goto handle_unusual; - continue; - // optional uint32 destination_port = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_destination_port(&has_bits); - _impl_.destination_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string protocol = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_protocol(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardTcpConnection.protocol")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardTcpConnection::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpConnection) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardTcpConnection.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // optional string source_ip = 2; - if (_internal_has_source_ip()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_source_ip().data(), static_cast(this->_internal_source_ip().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardTcpConnection.source_ip"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_source_ip(), target); - } - - // optional uint32 source_port = 3; - if (_internal_has_source_port()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_source_port(), target); - } - - // optional string destination_ip = 4; - if (_internal_has_destination_ip()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_destination_ip().data(), static_cast(this->_internal_destination_ip().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardTcpConnection.destination_ip"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_destination_ip(), target); - } - - // optional uint32 destination_port = 5; - if (_internal_has_destination_port()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_destination_port(), target); - } - - // string protocol = 6; - if (!this->_internal_protocol().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_protocol().data(), static_cast(this->_internal_protocol().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardTcpConnection.protocol"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_protocol(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpConnection) - return target; -} - -size_t AppGuardTcpConnection::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpConnection) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional string source_ip = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_source_ip()); - } - - // optional string destination_ip = 4; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_destination_ip()); - } - - } - // string protocol = 6; - if (!this->_internal_protocol().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_protocol()); - } - - if (cached_has_bits & 0x0000000cu) { - // optional uint32 source_port = 3; - if (cached_has_bits & 0x00000004u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_source_port()); - } - - // optional uint32 destination_port = 5; - if (cached_has_bits & 0x00000008u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_destination_port()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardTcpConnection::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardTcpConnection::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardTcpConnection::GetClassData() const { return &_class_data_; } - - -void AppGuardTcpConnection::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpConnection) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_set_source_ip(from._internal_source_ip()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_set_destination_ip(from._internal_destination_ip()); - } - } - if (!from._internal_protocol().empty()) { - _this->_internal_set_protocol(from._internal_protocol()); - } - if (cached_has_bits & 0x0000000cu) { - if (cached_has_bits & 0x00000004u) { - _this->_impl_.source_port_ = from._impl_.source_port_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.destination_port_ = from._impl_.destination_port_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardTcpConnection::CopyFrom(const AppGuardTcpConnection& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpConnection) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardTcpConnection::IsInitialized() const { - return true; -} - -void AppGuardTcpConnection::InternalSwap(AppGuardTcpConnection* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.source_ip_, lhs_arena, - &other->_impl_.source_ip_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.destination_ip_, lhs_arena, - &other->_impl_.destination_ip_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.protocol_, lhs_arena, - &other->_impl_.protocol_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppGuardTcpConnection, _impl_.destination_port_) - + sizeof(AppGuardTcpConnection::_impl_.destination_port_) - - PROTOBUF_FIELD_OFFSET(AppGuardTcpConnection, _impl_.source_port_)>( - reinterpret_cast(&_impl_.source_port_), - reinterpret_cast(&other->_impl_.source_port_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpConnection::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[2]); -} - -// =================================================================== - -class AppGuardIpInfo::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_country(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_asn(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_org(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_continent_code(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static void set_has_city(HasBits* has_bits) { - (*has_bits)[0] |= 16u; - } - static void set_has_region(HasBits* has_bits) { - (*has_bits)[0] |= 32u; - } - static void set_has_postal(HasBits* has_bits) { - (*has_bits)[0] |= 64u; - } - static void set_has_timezone(HasBits* has_bits) { - (*has_bits)[0] |= 128u; - } -}; - -AppGuardIpInfo::AppGuardIpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardIpInfo) -} -AppGuardIpInfo::AppGuardIpInfo(const AppGuardIpInfo& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardIpInfo* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.ip_){} - , decltype(_impl_.country_){} - , decltype(_impl_.asn_){} - , decltype(_impl_.org_){} - , decltype(_impl_.continent_code_){} - , decltype(_impl_.city_){} - , decltype(_impl_.region_){} - , decltype(_impl_.postal_){} - , decltype(_impl_.timezone_){} - , decltype(_impl_.blacklist_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_ip().empty()) { - _this->_impl_.ip_.Set(from._internal_ip(), - _this->GetArenaForAllocation()); - } - _impl_.country_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_country()) { - _this->_impl_.country_.Set(from._internal_country(), - _this->GetArenaForAllocation()); - } - _impl_.asn_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.asn_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_asn()) { - _this->_impl_.asn_.Set(from._internal_asn(), - _this->GetArenaForAllocation()); - } - _impl_.org_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.org_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_org()) { - _this->_impl_.org_.Set(from._internal_org(), - _this->GetArenaForAllocation()); - } - _impl_.continent_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.continent_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_continent_code()) { - _this->_impl_.continent_code_.Set(from._internal_continent_code(), - _this->GetArenaForAllocation()); - } - _impl_.city_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.city_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_city()) { - _this->_impl_.city_.Set(from._internal_city(), - _this->GetArenaForAllocation()); - } - _impl_.region_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_region()) { - _this->_impl_.region_.Set(from._internal_region(), - _this->GetArenaForAllocation()); - } - _impl_.postal_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.postal_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_postal()) { - _this->_impl_.postal_.Set(from._internal_postal(), - _this->GetArenaForAllocation()); - } - _impl_.timezone_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.timezone_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_timezone()) { - _this->_impl_.timezone_.Set(from._internal_timezone(), - _this->GetArenaForAllocation()); - } - _this->_impl_.blacklist_ = from._impl_.blacklist_; - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardIpInfo) -} - -inline void AppGuardIpInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.ip_){} - , decltype(_impl_.country_){} - , decltype(_impl_.asn_){} - , decltype(_impl_.org_){} - , decltype(_impl_.continent_code_){} - , decltype(_impl_.city_){} - , decltype(_impl_.region_){} - , decltype(_impl_.postal_){} - , decltype(_impl_.timezone_){} - , decltype(_impl_.blacklist_){false} - }; - _impl_.ip_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.ip_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.asn_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.asn_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.org_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.org_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.continent_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.continent_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.city_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.city_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.postal_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.postal_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.timezone_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.timezone_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardIpInfo::~AppGuardIpInfo() { - // @@protoc_insertion_point(destructor:appguard.AppGuardIpInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardIpInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.ip_.Destroy(); - _impl_.country_.Destroy(); - _impl_.asn_.Destroy(); - _impl_.org_.Destroy(); - _impl_.continent_code_.Destroy(); - _impl_.city_.Destroy(); - _impl_.region_.Destroy(); - _impl_.postal_.Destroy(); - _impl_.timezone_.Destroy(); -} - -void AppGuardIpInfo::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardIpInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardIpInfo) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.ip_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - if (cached_has_bits & 0x00000001u) { - _impl_.country_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.asn_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - _impl_.org_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000008u) { - _impl_.continent_code_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000010u) { - _impl_.city_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000020u) { - _impl_.region_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000040u) { - _impl_.postal_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000080u) { - _impl_.timezone_.ClearNonDefaultToEmpty(); - } - } - _impl_.blacklist_ = false; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardIpInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string ip = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_ip(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.ip")); - } else - goto handle_unusual; - continue; - // optional string country = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_country(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.country")); - } else - goto handle_unusual; - continue; - // optional string asn = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_asn(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.asn")); - } else - goto handle_unusual; - continue; - // optional string org = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_org(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.org")); - } else - goto handle_unusual; - continue; - // optional string continent_code = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_continent_code(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.continent_code")); - } else - goto handle_unusual; - continue; - // optional string city = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_city(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.city")); - } else - goto handle_unusual; - continue; - // optional string region = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - auto str = _internal_mutable_region(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.region")); - } else - goto handle_unusual; - continue; - // optional string postal = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - auto str = _internal_mutable_postal(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.postal")); - } else - goto handle_unusual; - continue; - // optional string timezone = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { - auto str = _internal_mutable_timezone(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardIpInfo.timezone")); - } else - goto handle_unusual; - continue; - // bool blacklist = 100; - case 100: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.blacklist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardIpInfo::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardIpInfo) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string ip = 1; - if (!this->_internal_ip().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_ip().data(), static_cast(this->_internal_ip().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.ip"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_ip(), target); - } - - // optional string country = 2; - if (_internal_has_country()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_country().data(), static_cast(this->_internal_country().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.country"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_country(), target); - } - - // optional string asn = 3; - if (_internal_has_asn()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_asn().data(), static_cast(this->_internal_asn().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.asn"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_asn(), target); - } - - // optional string org = 4; - if (_internal_has_org()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_org().data(), static_cast(this->_internal_org().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.org"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_org(), target); - } - - // optional string continent_code = 5; - if (_internal_has_continent_code()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_continent_code().data(), static_cast(this->_internal_continent_code().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.continent_code"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_continent_code(), target); - } - - // optional string city = 6; - if (_internal_has_city()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_city().data(), static_cast(this->_internal_city().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.city"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_city(), target); - } - - // optional string region = 7; - if (_internal_has_region()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_region().data(), static_cast(this->_internal_region().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.region"); - target = stream->WriteStringMaybeAliased( - 7, this->_internal_region(), target); - } - - // optional string postal = 8; - if (_internal_has_postal()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_postal().data(), static_cast(this->_internal_postal().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.postal"); - target = stream->WriteStringMaybeAliased( - 8, this->_internal_postal(), target); - } - - // optional string timezone = 9; - if (_internal_has_timezone()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_timezone().data(), static_cast(this->_internal_timezone().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardIpInfo.timezone"); - target = stream->WriteStringMaybeAliased( - 9, this->_internal_timezone(), target); - } - - // bool blacklist = 100; - if (this->_internal_blacklist() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(100, this->_internal_blacklist(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardIpInfo) - return target; -} - -size_t AppGuardIpInfo::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardIpInfo) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string ip = 1; - if (!this->_internal_ip().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_ip()); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - // optional string country = 2; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_country()); - } - - // optional string asn = 3; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_asn()); - } - - // optional string org = 4; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_org()); - } - - // optional string continent_code = 5; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_continent_code()); - } - - // optional string city = 6; - if (cached_has_bits & 0x00000010u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_city()); - } - - // optional string region = 7; - if (cached_has_bits & 0x00000020u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_region()); - } - - // optional string postal = 8; - if (cached_has_bits & 0x00000040u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_postal()); - } - - // optional string timezone = 9; - if (cached_has_bits & 0x00000080u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_timezone()); - } - - } - // bool blacklist = 100; - if (this->_internal_blacklist() != 0) { - total_size += 2 + 1; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardIpInfo::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardIpInfo::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardIpInfo::GetClassData() const { return &_class_data_; } - - -void AppGuardIpInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardIpInfo) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_ip().empty()) { - _this->_internal_set_ip(from._internal_ip()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x000000ffu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_set_country(from._internal_country()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_set_asn(from._internal_asn()); - } - if (cached_has_bits & 0x00000004u) { - _this->_internal_set_org(from._internal_org()); - } - if (cached_has_bits & 0x00000008u) { - _this->_internal_set_continent_code(from._internal_continent_code()); - } - if (cached_has_bits & 0x00000010u) { - _this->_internal_set_city(from._internal_city()); - } - if (cached_has_bits & 0x00000020u) { - _this->_internal_set_region(from._internal_region()); - } - if (cached_has_bits & 0x00000040u) { - _this->_internal_set_postal(from._internal_postal()); - } - if (cached_has_bits & 0x00000080u) { - _this->_internal_set_timezone(from._internal_timezone()); - } - } - if (from._internal_blacklist() != 0) { - _this->_internal_set_blacklist(from._internal_blacklist()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardIpInfo::CopyFrom(const AppGuardIpInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardIpInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardIpInfo::IsInitialized() const { - return true; -} - -void AppGuardIpInfo::InternalSwap(AppGuardIpInfo* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.ip_, lhs_arena, - &other->_impl_.ip_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.country_, lhs_arena, - &other->_impl_.country_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.asn_, lhs_arena, - &other->_impl_.asn_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.org_, lhs_arena, - &other->_impl_.org_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.continent_code_, lhs_arena, - &other->_impl_.continent_code_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.city_, lhs_arena, - &other->_impl_.city_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.region_, lhs_arena, - &other->_impl_.region_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.postal_, lhs_arena, - &other->_impl_.postal_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.timezone_, lhs_arena, - &other->_impl_.timezone_, rhs_arena - ); - swap(_impl_.blacklist_, other->_impl_.blacklist_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardIpInfo::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[3]); -} - -// =================================================================== - -class AppGuardTcpInfo::_Internal { - public: - static const ::appguard::AppGuardTcpConnection& connection(const AppGuardTcpInfo* msg); - static const ::appguard::AppGuardIpInfo& ip_info(const AppGuardTcpInfo* msg); -}; - -const ::appguard::AppGuardTcpConnection& -AppGuardTcpInfo::_Internal::connection(const AppGuardTcpInfo* msg) { - return *msg->_impl_.connection_; -} -const ::appguard::AppGuardIpInfo& -AppGuardTcpInfo::_Internal::ip_info(const AppGuardTcpInfo* msg) { - return *msg->_impl_.ip_info_; -} -AppGuardTcpInfo::AppGuardTcpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpInfo) -} -AppGuardTcpInfo::AppGuardTcpInfo(const AppGuardTcpInfo& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardTcpInfo* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.connection_){nullptr} - , decltype(_impl_.ip_info_){nullptr} - , decltype(_impl_.tcp_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_connection()) { - _this->_impl_.connection_ = new ::appguard::AppGuardTcpConnection(*from._impl_.connection_); - } - if (from._internal_has_ip_info()) { - _this->_impl_.ip_info_ = new ::appguard::AppGuardIpInfo(*from._impl_.ip_info_); - } - _this->_impl_.tcp_id_ = from._impl_.tcp_id_; - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpInfo) -} - -inline void AppGuardTcpInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.connection_){nullptr} - , decltype(_impl_.ip_info_){nullptr} - , decltype(_impl_.tcp_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -AppGuardTcpInfo::~AppGuardTcpInfo() { - // @@protoc_insertion_point(destructor:appguard.AppGuardTcpInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardTcpInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.connection_; - if (this != internal_default_instance()) delete _impl_.ip_info_; -} - -void AppGuardTcpInfo::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardTcpInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpInfo) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.connection_ != nullptr) { - delete _impl_.connection_; - } - _impl_.connection_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.ip_info_ != nullptr) { - delete _impl_.ip_info_; - } - _impl_.ip_info_ = nullptr; - _impl_.tcp_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardTcpInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .appguard.AppGuardTcpConnection connection = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_connection(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .appguard.AppGuardIpInfo ip_info = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_ip_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 tcp_id = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.tcp_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardTcpInfo::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpInfo) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .appguard.AppGuardTcpConnection connection = 1; - if (this->_internal_has_connection()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::connection(this), - _Internal::connection(this).GetCachedSize(), target, stream); - } - - // .appguard.AppGuardIpInfo ip_info = 2; - if (this->_internal_has_ip_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::ip_info(this), - _Internal::ip_info(this).GetCachedSize(), target, stream); - } - - // uint64 tcp_id = 3; - if (this->_internal_tcp_id() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_tcp_id(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpInfo) - return target; -} - -size_t AppGuardTcpInfo::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpInfo) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .appguard.AppGuardTcpConnection connection = 1; - if (this->_internal_has_connection()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.connection_); - } - - // .appguard.AppGuardIpInfo ip_info = 2; - if (this->_internal_has_ip_info()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.ip_info_); - } - - // uint64 tcp_id = 3; - if (this->_internal_tcp_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_tcp_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardTcpInfo::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardTcpInfo::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardTcpInfo::GetClassData() const { return &_class_data_; } - - -void AppGuardTcpInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpInfo) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_connection()) { - _this->_internal_mutable_connection()->::appguard::AppGuardTcpConnection::MergeFrom( - from._internal_connection()); - } - if (from._internal_has_ip_info()) { - _this->_internal_mutable_ip_info()->::appguard::AppGuardIpInfo::MergeFrom( - from._internal_ip_info()); - } - if (from._internal_tcp_id() != 0) { - _this->_internal_set_tcp_id(from._internal_tcp_id()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardTcpInfo::CopyFrom(const AppGuardTcpInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardTcpInfo::IsInitialized() const { - return true; -} - -void AppGuardTcpInfo::InternalSwap(AppGuardTcpInfo* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppGuardTcpInfo, _impl_.tcp_id_) - + sizeof(AppGuardTcpInfo::_impl_.tcp_id_) - - PROTOBUF_FIELD_OFFSET(AppGuardTcpInfo, _impl_.connection_)>( - reinterpret_cast(&_impl_.connection_), - reinterpret_cast(&other->_impl_.connection_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpInfo::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[4]); -} - -// =================================================================== - -AppGuardHttpRequest_HeadersEntry_DoNotUse::AppGuardHttpRequest_HeadersEntry_DoNotUse() {} -AppGuardHttpRequest_HeadersEntry_DoNotUse::AppGuardHttpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void AppGuardHttpRequest_HeadersEntry_DoNotUse::MergeFrom(const AppGuardHttpRequest_HeadersEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest_HeadersEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[5]); -} - -// =================================================================== - -AppGuardHttpRequest_QueryEntry_DoNotUse::AppGuardHttpRequest_QueryEntry_DoNotUse() {} -AppGuardHttpRequest_QueryEntry_DoNotUse::AppGuardHttpRequest_QueryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void AppGuardHttpRequest_QueryEntry_DoNotUse::MergeFrom(const AppGuardHttpRequest_QueryEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest_QueryEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[6]); -} - -// =================================================================== - -class AppGuardHttpRequest::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_body(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardHttpRequest* msg); -}; - -const ::appguard::AppGuardTcpInfo& -AppGuardHttpRequest::_Internal::tcp_info(const AppGuardHttpRequest* msg) { - return *msg->_impl_.tcp_info_; -} -AppGuardHttpRequest::AppGuardHttpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - if (arena != nullptr && !is_message_owned) { - arena->OwnCustomDestructor(this, &AppGuardHttpRequest::ArenaDtor); - } - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardHttpRequest) -} -AppGuardHttpRequest::AppGuardHttpRequest(const AppGuardHttpRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardHttpRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{} - , /*decltype(_impl_.query_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.original_url_){} - , decltype(_impl_.method_){} - , decltype(_impl_.body_){} - , decltype(_impl_.tcp_info_){nullptr}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - _this->_impl_.query_.MergeFrom(from._impl_.query_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - _impl_.original_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.original_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_original_url().empty()) { - _this->_impl_.original_url_.Set(from._internal_original_url(), - _this->GetArenaForAllocation()); - } - _impl_.method_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.method_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_method().empty()) { - _this->_impl_.method_.Set(from._internal_method(), - _this->GetArenaForAllocation()); - } - _impl_.body_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_body()) { - _this->_impl_.body_.Set(from._internal_body(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_tcp_info()) { - _this->_impl_.tcp_info_ = new ::appguard::AppGuardTcpInfo(*from._impl_.tcp_info_); - } - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardHttpRequest) -} - -inline void AppGuardHttpRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{::_pbi::ArenaInitialized(), arena} - , /*decltype(_impl_.query_)*/{::_pbi::ArenaInitialized(), arena} - , decltype(_impl_.token_){} - , decltype(_impl_.original_url_){} - , decltype(_impl_.method_){} - , decltype(_impl_.body_){} - , decltype(_impl_.tcp_info_){nullptr} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.original_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.original_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.method_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.method_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardHttpRequest::~AppGuardHttpRequest() { - // @@protoc_insertion_point(destructor:appguard.AppGuardHttpRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - ArenaDtor(this); - return; - } - SharedDtor(); -} - -inline void AppGuardHttpRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.headers_.Destruct(); - _impl_.headers_.~MapField(); - _impl_.query_.Destruct(); - _impl_.query_.~MapField(); - _impl_.token_.Destroy(); - _impl_.original_url_.Destroy(); - _impl_.method_.Destroy(); - _impl_.body_.Destroy(); - if (this != internal_default_instance()) delete _impl_.tcp_info_; -} - -void AppGuardHttpRequest::ArenaDtor(void* object) { - AppGuardHttpRequest* _this = reinterpret_cast< AppGuardHttpRequest* >(object); - _this->_impl_.headers_.Destruct(); - _this->_impl_.query_.Destruct(); -} -void AppGuardHttpRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardHttpRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardHttpRequest) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.headers_.Clear(); - _impl_.query_.Clear(); - _impl_.token_.ClearToEmpty(); - _impl_.original_url_.ClearToEmpty(); - _impl_.method_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - _impl_.body_.ClearNonDefaultToEmpty(); - } - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardHttpRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardHttpRequest.token")); - } else - goto handle_unusual; - continue; - // string original_url = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_original_url(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardHttpRequest.original_url")); - } else - goto handle_unusual; - continue; - // map headers = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.headers_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - // string method = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_method(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardHttpRequest.method")); - } else - goto handle_unusual; - continue; - // optional string body = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_body(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardHttpRequest.body")); - } else - goto handle_unusual; - continue; - // map query = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.query_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); - } else - goto handle_unusual; - continue; - // .appguard.AppGuardTcpInfo tcp_info = 100; - case 100: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardHttpRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardHttpRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // string original_url = 2; - if (!this->_internal_original_url().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_original_url().data(), static_cast(this->_internal_original_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.original_url"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_original_url(), target); - } - - // map headers = 3; - if (!this->_internal_headers().empty()) { - using MapType = ::_pb::Map; - using WireHelper = AppGuardHttpRequest_HeadersEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_headers(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.HeadersEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.HeadersEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - - // string method = 4; - if (!this->_internal_method().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_method().data(), static_cast(this->_internal_method().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.method"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_method(), target); - } - - // optional string body = 5; - if (_internal_has_body()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_body().data(), static_cast(this->_internal_body().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.body"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_body(), target); - } - - // map query = 6; - if (!this->_internal_query().empty()) { - using MapType = ::_pb::Map; - using WireHelper = AppGuardHttpRequest_QueryEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_query(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.QueryEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpRequest.QueryEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(6, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(6, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(100, _Internal::tcp_info(this), - _Internal::tcp_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardHttpRequest) - return target; -} - -size_t AppGuardHttpRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardHttpRequest) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map headers = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_headers().begin(); - it != this->_internal_headers().end(); ++it) { - total_size += AppGuardHttpRequest_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // map query = 6; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_query_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_query().begin(); - it != this->_internal_query().end(); ++it) { - total_size += AppGuardHttpRequest_QueryEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - // string original_url = 2; - if (!this->_internal_original_url().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_original_url()); - } - - // string method = 4; - if (!this->_internal_method().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_method()); - } - - // optional string body = 5; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_body()); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.tcp_info_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardHttpRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardHttpRequest::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardHttpRequest::GetClassData() const { return &_class_data_; } - - -void AppGuardHttpRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardHttpRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - _this->_impl_.query_.MergeFrom(from._impl_.query_); - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - if (!from._internal_original_url().empty()) { - _this->_internal_set_original_url(from._internal_original_url()); - } - if (!from._internal_method().empty()) { - _this->_internal_set_method(from._internal_method()); - } - if (from._internal_has_body()) { - _this->_internal_set_body(from._internal_body()); - } - if (from._internal_has_tcp_info()) { - _this->_internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom( - from._internal_tcp_info()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardHttpRequest::CopyFrom(const AppGuardHttpRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardHttpRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardHttpRequest::IsInitialized() const { - return true; -} - -void AppGuardHttpRequest::InternalSwap(AppGuardHttpRequest* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.headers_.InternalSwap(&other->_impl_.headers_); - _impl_.query_.InternalSwap(&other->_impl_.query_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.original_url_, lhs_arena, - &other->_impl_.original_url_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.method_, lhs_arena, - &other->_impl_.method_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.body_, lhs_arena, - &other->_impl_.body_, rhs_arena - ); - swap(_impl_.tcp_info_, other->_impl_.tcp_info_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[7]); -} - -// =================================================================== - -AppGuardHttpResponse_HeadersEntry_DoNotUse::AppGuardHttpResponse_HeadersEntry_DoNotUse() {} -AppGuardHttpResponse_HeadersEntry_DoNotUse::AppGuardHttpResponse_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void AppGuardHttpResponse_HeadersEntry_DoNotUse::MergeFrom(const AppGuardHttpResponse_HeadersEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpResponse_HeadersEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[8]); -} - -// =================================================================== - -class AppGuardHttpResponse::_Internal { - public: - static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardHttpResponse* msg); -}; - -const ::appguard::AppGuardTcpInfo& -AppGuardHttpResponse::_Internal::tcp_info(const AppGuardHttpResponse* msg) { - return *msg->_impl_.tcp_info_; -} -AppGuardHttpResponse::AppGuardHttpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - if (arena != nullptr && !is_message_owned) { - arena->OwnCustomDestructor(this, &AppGuardHttpResponse::ArenaDtor); - } - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardHttpResponse) -} -AppGuardHttpResponse::AppGuardHttpResponse(const AppGuardHttpResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardHttpResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - /*decltype(_impl_.headers_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.tcp_info_){nullptr} - , decltype(_impl_.code_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_tcp_info()) { - _this->_impl_.tcp_info_ = new ::appguard::AppGuardTcpInfo(*from._impl_.tcp_info_); - } - _this->_impl_.code_ = from._impl_.code_; - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardHttpResponse) -} - -inline void AppGuardHttpResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - /*decltype(_impl_.headers_)*/{::_pbi::ArenaInitialized(), arena} - , decltype(_impl_.token_){} - , decltype(_impl_.tcp_info_){nullptr} - , decltype(_impl_.code_){0u} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardHttpResponse::~AppGuardHttpResponse() { - // @@protoc_insertion_point(destructor:appguard.AppGuardHttpResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - ArenaDtor(this); - return; - } - SharedDtor(); -} - -inline void AppGuardHttpResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.headers_.Destruct(); - _impl_.headers_.~MapField(); - _impl_.token_.Destroy(); - if (this != internal_default_instance()) delete _impl_.tcp_info_; -} - -void AppGuardHttpResponse::ArenaDtor(void* object) { - AppGuardHttpResponse* _this = reinterpret_cast< AppGuardHttpResponse* >(object); - _this->_impl_.headers_.Destruct(); -} -void AppGuardHttpResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardHttpResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardHttpResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.headers_.Clear(); - _impl_.token_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; - _impl_.code_ = 0u; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardHttpResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardHttpResponse.token")); - } else - goto handle_unusual; - continue; - // uint32 code = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // map headers = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.headers_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - // .appguard.AppGuardTcpInfo tcp_info = 100; - case 100: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardHttpResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardHttpResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpResponse.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // uint32 code = 2; - if (this->_internal_code() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_code(), target); - } - - // map headers = 3; - if (!this->_internal_headers().empty()) { - using MapType = ::_pb::Map; - using WireHelper = AppGuardHttpResponse_HeadersEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_headers(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpResponse.HeadersEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardHttpResponse.HeadersEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(100, _Internal::tcp_info(this), - _Internal::tcp_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardHttpResponse) - return target; -} - -size_t AppGuardHttpResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardHttpResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map headers = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_headers().begin(); - it != this->_internal_headers().end(); ++it) { - total_size += AppGuardHttpResponse_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.tcp_info_); - } - - // uint32 code = 2; - if (this->_internal_code() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_code()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardHttpResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardHttpResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardHttpResponse::GetClassData() const { return &_class_data_; } - - -void AppGuardHttpResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardHttpResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - if (from._internal_has_tcp_info()) { - _this->_internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom( - from._internal_tcp_info()); - } - if (from._internal_code() != 0) { - _this->_internal_set_code(from._internal_code()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardHttpResponse::CopyFrom(const AppGuardHttpResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardHttpResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardHttpResponse::IsInitialized() const { - return true; -} - -void AppGuardHttpResponse::InternalSwap(AppGuardHttpResponse* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.headers_.InternalSwap(&other->_impl_.headers_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppGuardHttpResponse, _impl_.code_) - + sizeof(AppGuardHttpResponse::_impl_.code_) - - PROTOBUF_FIELD_OFFSET(AppGuardHttpResponse, _impl_.tcp_info_)>( - reinterpret_cast(&_impl_.tcp_info_), - reinterpret_cast(&other->_impl_.tcp_info_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[9]); -} - -// =================================================================== - -AppGuardSmtpRequest_HeadersEntry_DoNotUse::AppGuardSmtpRequest_HeadersEntry_DoNotUse() {} -AppGuardSmtpRequest_HeadersEntry_DoNotUse::AppGuardSmtpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void AppGuardSmtpRequest_HeadersEntry_DoNotUse::MergeFrom(const AppGuardSmtpRequest_HeadersEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpRequest_HeadersEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[10]); -} - -// =================================================================== - -class AppGuardSmtpRequest::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_body(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardSmtpRequest* msg); -}; - -const ::appguard::AppGuardTcpInfo& -AppGuardSmtpRequest::_Internal::tcp_info(const AppGuardSmtpRequest* msg) { - return *msg->_impl_.tcp_info_; -} -AppGuardSmtpRequest::AppGuardSmtpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - if (arena != nullptr && !is_message_owned) { - arena->OwnCustomDestructor(this, &AppGuardSmtpRequest::ArenaDtor); - } - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardSmtpRequest) -} -AppGuardSmtpRequest::AppGuardSmtpRequest(const AppGuardSmtpRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardSmtpRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.body_){} - , decltype(_impl_.tcp_info_){nullptr}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - _impl_.body_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (from._internal_has_body()) { - _this->_impl_.body_.Set(from._internal_body(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_tcp_info()) { - _this->_impl_.tcp_info_ = new ::appguard::AppGuardTcpInfo(*from._impl_.tcp_info_); - } - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardSmtpRequest) -} - -inline void AppGuardSmtpRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.headers_)*/{::_pbi::ArenaInitialized(), arena} - , decltype(_impl_.token_){} - , decltype(_impl_.body_){} - , decltype(_impl_.tcp_info_){nullptr} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.body_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardSmtpRequest::~AppGuardSmtpRequest() { - // @@protoc_insertion_point(destructor:appguard.AppGuardSmtpRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - ArenaDtor(this); - return; - } - SharedDtor(); -} - -inline void AppGuardSmtpRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.headers_.Destruct(); - _impl_.headers_.~MapField(); - _impl_.token_.Destroy(); - _impl_.body_.Destroy(); - if (this != internal_default_instance()) delete _impl_.tcp_info_; -} - -void AppGuardSmtpRequest::ArenaDtor(void* object) { - AppGuardSmtpRequest* _this = reinterpret_cast< AppGuardSmtpRequest* >(object); - _this->_impl_.headers_.Destruct(); -} -void AppGuardSmtpRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardSmtpRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardSmtpRequest) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.headers_.Clear(); - _impl_.token_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - _impl_.body_.ClearNonDefaultToEmpty(); - } - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardSmtpRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardSmtpRequest.token")); - } else - goto handle_unusual; - continue; - // map headers = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.headers_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // optional string body = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_body(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardSmtpRequest.body")); - } else - goto handle_unusual; - continue; - // .appguard.AppGuardTcpInfo tcp_info = 100; - case 100: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardSmtpRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardSmtpRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardSmtpRequest.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // map headers = 2; - if (!this->_internal_headers().empty()) { - using MapType = ::_pb::Map; - using WireHelper = AppGuardSmtpRequest_HeadersEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_headers(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardSmtpRequest.HeadersEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardSmtpRequest.HeadersEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - - // optional string body = 3; - if (_internal_has_body()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_body().data(), static_cast(this->_internal_body().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardSmtpRequest.body"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_body(), target); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(100, _Internal::tcp_info(this), - _Internal::tcp_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardSmtpRequest) - return target; -} - -size_t AppGuardSmtpRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardSmtpRequest) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map headers = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_headers().begin(); - it != this->_internal_headers().end(); ++it) { - total_size += AppGuardSmtpRequest_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - // optional string body = 3; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_body()); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.tcp_info_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardSmtpRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardSmtpRequest::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardSmtpRequest::GetClassData() const { return &_class_data_; } - - -void AppGuardSmtpRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardSmtpRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.headers_.MergeFrom(from._impl_.headers_); - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - if (from._internal_has_body()) { - _this->_internal_set_body(from._internal_body()); - } - if (from._internal_has_tcp_info()) { - _this->_internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom( - from._internal_tcp_info()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardSmtpRequest::CopyFrom(const AppGuardSmtpRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardSmtpRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardSmtpRequest::IsInitialized() const { - return true; -} - -void AppGuardSmtpRequest::InternalSwap(AppGuardSmtpRequest* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.headers_.InternalSwap(&other->_impl_.headers_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.body_, lhs_arena, - &other->_impl_.body_, rhs_arena - ); - swap(_impl_.tcp_info_, other->_impl_.tcp_info_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpRequest::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[11]); -} - -// =================================================================== - -class AppGuardSmtpResponse::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_code(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardSmtpResponse* msg); -}; - -const ::appguard::AppGuardTcpInfo& -AppGuardSmtpResponse::_Internal::tcp_info(const AppGuardSmtpResponse* msg) { - return *msg->_impl_.tcp_info_; -} -AppGuardSmtpResponse::AppGuardSmtpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardSmtpResponse) -} -AppGuardSmtpResponse::AppGuardSmtpResponse(const AppGuardSmtpResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardSmtpResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.tcp_info_){nullptr} - , decltype(_impl_.code_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_token().empty()) { - _this->_impl_.token_.Set(from._internal_token(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_tcp_info()) { - _this->_impl_.tcp_info_ = new ::appguard::AppGuardTcpInfo(*from._impl_.tcp_info_); - } - _this->_impl_.code_ = from._impl_.code_; - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardSmtpResponse) -} - -inline void AppGuardSmtpResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.token_){} - , decltype(_impl_.tcp_info_){nullptr} - , decltype(_impl_.code_){0u} - }; - _impl_.token_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.token_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -AppGuardSmtpResponse::~AppGuardSmtpResponse() { - // @@protoc_insertion_point(destructor:appguard.AppGuardSmtpResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardSmtpResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.token_.Destroy(); - if (this != internal_default_instance()) delete _impl_.tcp_info_; -} - -void AppGuardSmtpResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardSmtpResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardSmtpResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.token_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; - _impl_.code_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardSmtpResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string token = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_token(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "appguard.AppGuardSmtpResponse.token")); - } else - goto handle_unusual; - continue; - // optional uint32 code = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_code(&has_bits); - _impl_.code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .appguard.AppGuardTcpInfo tcp_info = 100; - case 100: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardSmtpResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardSmtpResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_token().data(), static_cast(this->_internal_token().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "appguard.AppGuardSmtpResponse.token"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_token(), target); - } - - // optional uint32 code = 2; - if (_internal_has_code()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_code(), target); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(100, _Internal::tcp_info(this), - _Internal::tcp_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardSmtpResponse) - return target; -} - -size_t AppGuardSmtpResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardSmtpResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string token = 1; - if (!this->_internal_token().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_token()); - } - - // .appguard.AppGuardTcpInfo tcp_info = 100; - if (this->_internal_has_tcp_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.tcp_info_); - } - - // optional uint32 code = 2; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_code()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardSmtpResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardSmtpResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardSmtpResponse::GetClassData() const { return &_class_data_; } - - -void AppGuardSmtpResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardSmtpResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_token().empty()) { - _this->_internal_set_token(from._internal_token()); - } - if (from._internal_has_tcp_info()) { - _this->_internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom( - from._internal_tcp_info()); - } - if (from._internal_has_code()) { - _this->_internal_set_code(from._internal_code()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardSmtpResponse::CopyFrom(const AppGuardSmtpResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardSmtpResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardSmtpResponse::IsInitialized() const { - return true; -} - -void AppGuardSmtpResponse::InternalSwap(AppGuardSmtpResponse* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.token_, lhs_arena, - &other->_impl_.token_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AppGuardSmtpResponse, _impl_.code_) - + sizeof(AppGuardSmtpResponse::_impl_.code_) - - PROTOBUF_FIELD_OFFSET(AppGuardSmtpResponse, _impl_.tcp_info_)>( - reinterpret_cast(&_impl_.tcp_info_), - reinterpret_cast(&other->_impl_.tcp_info_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[12]); -} - -// =================================================================== - -class AppGuardResponse::_Internal { - public: -}; - -AppGuardResponse::AppGuardResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardResponse) -} -AppGuardResponse::AppGuardResponse(const AppGuardResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.policy_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.policy_ = from._impl_.policy_; - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardResponse) -} - -inline void AppGuardResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.policy_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -AppGuardResponse::~AppGuardResponse() { - // @@protoc_insertion_point(destructor:appguard.AppGuardResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void AppGuardResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.policy_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .appguard.FirewallPolicy policy = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_policy(static_cast<::appguard::FirewallPolicy>(val)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .appguard.FirewallPolicy policy = 2; - if (this->_internal_policy() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_policy(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardResponse) - return target; -} - -size_t AppGuardResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .appguard.FirewallPolicy policy = 2; - if (this->_internal_policy() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_policy()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardResponse::GetClassData() const { return &_class_data_; } - - -void AppGuardResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_policy() != 0) { - _this->_internal_set_policy(from._internal_policy()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardResponse::CopyFrom(const AppGuardResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardResponse::IsInitialized() const { - return true; -} - -void AppGuardResponse::InternalSwap(AppGuardResponse* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.policy_, other->_impl_.policy_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[13]); -} - -// =================================================================== - -class AppGuardTcpResponse::_Internal { - public: - static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardTcpResponse* msg); -}; - -const ::appguard::AppGuardTcpInfo& -AppGuardTcpResponse::_Internal::tcp_info(const AppGuardTcpResponse* msg) { - return *msg->_impl_.tcp_info_; -} -AppGuardTcpResponse::AppGuardTcpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpResponse) -} -AppGuardTcpResponse::AppGuardTcpResponse(const AppGuardTcpResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - AppGuardTcpResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.tcp_info_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_tcp_info()) { - _this->_impl_.tcp_info_ = new ::appguard::AppGuardTcpInfo(*from._impl_.tcp_info_); - } - // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpResponse) -} - -inline void AppGuardTcpResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.tcp_info_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -AppGuardTcpResponse::~AppGuardTcpResponse() { - // @@protoc_insertion_point(destructor:appguard.AppGuardTcpResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AppGuardTcpResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.tcp_info_; -} - -void AppGuardTcpResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AppGuardTcpResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* AppGuardTcpResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .appguard.AppGuardTcpInfo tcp_info = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AppGuardTcpResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .appguard.AppGuardTcpInfo tcp_info = 1; - if (this->_internal_has_tcp_info()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::tcp_info(this), - _Internal::tcp_info(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpResponse) - return target; -} - -size_t AppGuardTcpResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .appguard.AppGuardTcpInfo tcp_info = 1; - if (this->_internal_has_tcp_info()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.tcp_info_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AppGuardTcpResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - AppGuardTcpResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AppGuardTcpResponse::GetClassData() const { return &_class_data_; } - - -void AppGuardTcpResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_tcp_info()) { - _this->_internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom( - from._internal_tcp_info()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void AppGuardTcpResponse::CopyFrom(const AppGuardTcpResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool AppGuardTcpResponse::IsInitialized() const { - return true; -} - -void AppGuardTcpResponse::InternalSwap(AppGuardTcpResponse* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.tcp_info_, other->_impl_.tcp_info_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_appguard_2eproto_getter, &descriptor_table_appguard_2eproto_once, - file_level_metadata_appguard_2eproto[14]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace appguard -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::appguard::HeartbeatRequest* -Arena::CreateMaybeMessage< ::appguard::HeartbeatRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::HeartbeatRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::HeartbeatResponse* -Arena::CreateMaybeMessage< ::appguard::HeartbeatResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::HeartbeatResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpConnection* -Arena::CreateMaybeMessage< ::appguard::AppGuardTcpConnection >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardTcpConnection >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardIpInfo* -Arena::CreateMaybeMessage< ::appguard::AppGuardIpInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardIpInfo >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpInfo* -Arena::CreateMaybeMessage< ::appguard::AppGuardTcpInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardTcpInfo >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse* -Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse* -Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest* -Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse* -Arena::CreateMaybeMessage< ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpResponse* -Arena::CreateMaybeMessage< ::appguard::AppGuardHttpResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardHttpResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse* -Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpRequest* -Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpResponse* -Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardResponse* -Arena::CreateMaybeMessage< ::appguard::AppGuardResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpResponse* -Arena::CreateMaybeMessage< ::appguard::AppGuardTcpResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::appguard::AppGuardTcpResponse >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/appguard.pb.h b/src/appguard.pb.h deleted file mode 100644 index 72b98dc..0000000 --- a/src/appguard.pb.h +++ /dev/null @@ -1,5027 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: appguard.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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) -#include -#define PROTOBUF_INTERNAL_EXPORT_appguard_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_appguard_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_appguard_2eproto; -namespace appguard { -class AppGuardHttpRequest; -struct AppGuardHttpRequestDefaultTypeInternal; -extern AppGuardHttpRequestDefaultTypeInternal _AppGuardHttpRequest_default_instance_; -class AppGuardHttpRequest_HeadersEntry_DoNotUse; -struct AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal; -extern AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_; -class AppGuardHttpRequest_QueryEntry_DoNotUse; -struct AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal; -extern AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_; -class AppGuardHttpResponse; -struct AppGuardHttpResponseDefaultTypeInternal; -extern AppGuardHttpResponseDefaultTypeInternal _AppGuardHttpResponse_default_instance_; -class AppGuardHttpResponse_HeadersEntry_DoNotUse; -struct AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal; -extern AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_; -class AppGuardIpInfo; -struct AppGuardIpInfoDefaultTypeInternal; -extern AppGuardIpInfoDefaultTypeInternal _AppGuardIpInfo_default_instance_; -class AppGuardResponse; -struct AppGuardResponseDefaultTypeInternal; -extern AppGuardResponseDefaultTypeInternal _AppGuardResponse_default_instance_; -class AppGuardSmtpRequest; -struct AppGuardSmtpRequestDefaultTypeInternal; -extern AppGuardSmtpRequestDefaultTypeInternal _AppGuardSmtpRequest_default_instance_; -class AppGuardSmtpRequest_HeadersEntry_DoNotUse; -struct AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal; -extern AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_; -class AppGuardSmtpResponse; -struct AppGuardSmtpResponseDefaultTypeInternal; -extern AppGuardSmtpResponseDefaultTypeInternal _AppGuardSmtpResponse_default_instance_; -class AppGuardTcpConnection; -struct AppGuardTcpConnectionDefaultTypeInternal; -extern AppGuardTcpConnectionDefaultTypeInternal _AppGuardTcpConnection_default_instance_; -class AppGuardTcpInfo; -struct AppGuardTcpInfoDefaultTypeInternal; -extern AppGuardTcpInfoDefaultTypeInternal _AppGuardTcpInfo_default_instance_; -class AppGuardTcpResponse; -struct AppGuardTcpResponseDefaultTypeInternal; -extern AppGuardTcpResponseDefaultTypeInternal _AppGuardTcpResponse_default_instance_; -class HeartbeatRequest; -struct HeartbeatRequestDefaultTypeInternal; -extern HeartbeatRequestDefaultTypeInternal _HeartbeatRequest_default_instance_; -class HeartbeatResponse; -struct HeartbeatResponseDefaultTypeInternal; -extern HeartbeatResponseDefaultTypeInternal _HeartbeatResponse_default_instance_; -} // namespace appguard -PROTOBUF_NAMESPACE_OPEN -template<> ::appguard::AppGuardHttpRequest* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest>(Arena*); -template<> ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse>(Arena*); -template<> ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse>(Arena*); -template<> ::appguard::AppGuardHttpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpResponse>(Arena*); -template<> ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse>(Arena*); -template<> ::appguard::AppGuardIpInfo* Arena::CreateMaybeMessage<::appguard::AppGuardIpInfo>(Arena*); -template<> ::appguard::AppGuardResponse* Arena::CreateMaybeMessage<::appguard::AppGuardResponse>(Arena*); -template<> ::appguard::AppGuardSmtpRequest* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpRequest>(Arena*); -template<> ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse>(Arena*); -template<> ::appguard::AppGuardSmtpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpResponse>(Arena*); -template<> ::appguard::AppGuardTcpConnection* Arena::CreateMaybeMessage<::appguard::AppGuardTcpConnection>(Arena*); -template<> ::appguard::AppGuardTcpInfo* Arena::CreateMaybeMessage<::appguard::AppGuardTcpInfo>(Arena*); -template<> ::appguard::AppGuardTcpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardTcpResponse>(Arena*); -template<> ::appguard::HeartbeatRequest* Arena::CreateMaybeMessage<::appguard::HeartbeatRequest>(Arena*); -template<> ::appguard::HeartbeatResponse* Arena::CreateMaybeMessage<::appguard::HeartbeatResponse>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace appguard { - -enum DeviceStatus : int { - DRAFT = 0, - ACTIVE = 1, - ARCHIVED = 2, - DELETED = 3, - DS_UNKNOWN = 4, - DeviceStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - DeviceStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool DeviceStatus_IsValid(int value); -constexpr DeviceStatus DeviceStatus_MIN = DRAFT; -constexpr DeviceStatus DeviceStatus_MAX = DS_UNKNOWN; -constexpr int DeviceStatus_ARRAYSIZE = DeviceStatus_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeviceStatus_descriptor(); -template -inline const std::string& DeviceStatus_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function DeviceStatus_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - DeviceStatus_descriptor(), enum_t_value); -} -inline bool DeviceStatus_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceStatus* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - DeviceStatus_descriptor(), name, value); -} -enum FirewallPolicy : int { - UNKNOWN = 0, - ALLOW = 1, - DENY = 2, - FirewallPolicy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - FirewallPolicy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool FirewallPolicy_IsValid(int value); -constexpr FirewallPolicy FirewallPolicy_MIN = UNKNOWN; -constexpr FirewallPolicy FirewallPolicy_MAX = DENY; -constexpr int FirewallPolicy_ARRAYSIZE = FirewallPolicy_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FirewallPolicy_descriptor(); -template -inline const std::string& FirewallPolicy_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function FirewallPolicy_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - FirewallPolicy_descriptor(), enum_t_value); -} -inline bool FirewallPolicy_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FirewallPolicy* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - FirewallPolicy_descriptor(), name, value); -} -// =================================================================== - -class HeartbeatRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.HeartbeatRequest) */ { - public: - inline HeartbeatRequest() : HeartbeatRequest(nullptr) {} - ~HeartbeatRequest() override; - explicit PROTOBUF_CONSTEXPR HeartbeatRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeartbeatRequest(const HeartbeatRequest& from); - HeartbeatRequest(HeartbeatRequest&& from) noexcept - : HeartbeatRequest() { - *this = ::std::move(from); - } - - inline HeartbeatRequest& operator=(const HeartbeatRequest& from) { - CopyFrom(from); - return *this; - } - inline HeartbeatRequest& operator=(HeartbeatRequest&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HeartbeatRequest& default_instance() { - return *internal_default_instance(); - } - static inline const HeartbeatRequest* internal_default_instance() { - return reinterpret_cast( - &_HeartbeatRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(HeartbeatRequest& a, HeartbeatRequest& b) { - a.Swap(&b); - } - inline void Swap(HeartbeatRequest* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HeartbeatRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeartbeatRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HeartbeatRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const HeartbeatRequest& from) { - HeartbeatRequest::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HeartbeatRequest* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.HeartbeatRequest"; - } - protected: - explicit HeartbeatRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kAppIdFieldNumber = 1, - kAppSecretFieldNumber = 2, - }; - // string app_id = 1; - void clear_app_id(); - const std::string& app_id() const; - template - void set_app_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_app_id(); - PROTOBUF_NODISCARD std::string* release_app_id(); - void set_allocated_app_id(std::string* app_id); - private: - const std::string& _internal_app_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_app_id(const std::string& value); - std::string* _internal_mutable_app_id(); - public: - - // string app_secret = 2; - void clear_app_secret(); - const std::string& app_secret() const; - template - void set_app_secret(ArgT0&& arg0, ArgT... args); - std::string* mutable_app_secret(); - PROTOBUF_NODISCARD std::string* release_app_secret(); - void set_allocated_app_secret(std::string* app_secret); - private: - const std::string& _internal_app_secret() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_app_secret(const std::string& value); - std::string* _internal_mutable_app_secret(); - public: - - // @@protoc_insertion_point(class_scope:appguard.HeartbeatRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_secret_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class HeartbeatResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.HeartbeatResponse) */ { - public: - inline HeartbeatResponse() : HeartbeatResponse(nullptr) {} - ~HeartbeatResponse() override; - explicit PROTOBUF_CONSTEXPR HeartbeatResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeartbeatResponse(const HeartbeatResponse& from); - HeartbeatResponse(HeartbeatResponse&& from) noexcept - : HeartbeatResponse() { - *this = ::std::move(from); - } - - inline HeartbeatResponse& operator=(const HeartbeatResponse& from) { - CopyFrom(from); - return *this; - } - inline HeartbeatResponse& operator=(HeartbeatResponse&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HeartbeatResponse& default_instance() { - return *internal_default_instance(); - } - static inline const HeartbeatResponse* internal_default_instance() { - return reinterpret_cast( - &_HeartbeatResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(HeartbeatResponse& a, HeartbeatResponse& b) { - a.Swap(&b); - } - inline void Swap(HeartbeatResponse* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HeartbeatResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeartbeatResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HeartbeatResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const HeartbeatResponse& from) { - HeartbeatResponse::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HeartbeatResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.HeartbeatResponse"; - } - protected: - explicit HeartbeatResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTokenFieldNumber = 1, - kStatusFieldNumber = 2, - }; - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // .appguard.DeviceStatus status = 2; - void clear_status(); - ::appguard::DeviceStatus status() const; - void set_status(::appguard::DeviceStatus value); - private: - ::appguard::DeviceStatus _internal_status() const; - void _internal_set_status(::appguard::DeviceStatus value); - public: - - // @@protoc_insertion_point(class_scope:appguard.HeartbeatResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - int status_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardTcpConnection final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpConnection) */ { - public: - inline AppGuardTcpConnection() : AppGuardTcpConnection(nullptr) {} - ~AppGuardTcpConnection() override; - explicit PROTOBUF_CONSTEXPR AppGuardTcpConnection(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardTcpConnection(const AppGuardTcpConnection& from); - AppGuardTcpConnection(AppGuardTcpConnection&& from) noexcept - : AppGuardTcpConnection() { - *this = ::std::move(from); - } - - inline AppGuardTcpConnection& operator=(const AppGuardTcpConnection& from) { - CopyFrom(from); - return *this; - } - inline AppGuardTcpConnection& operator=(AppGuardTcpConnection&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardTcpConnection& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardTcpConnection* internal_default_instance() { - return reinterpret_cast( - &_AppGuardTcpConnection_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(AppGuardTcpConnection& a, AppGuardTcpConnection& b) { - a.Swap(&b); - } - inline void Swap(AppGuardTcpConnection* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardTcpConnection* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardTcpConnection* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardTcpConnection& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardTcpConnection& from) { - AppGuardTcpConnection::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardTcpConnection* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardTcpConnection"; - } - protected: - explicit AppGuardTcpConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTokenFieldNumber = 1, - kSourceIpFieldNumber = 2, - kDestinationIpFieldNumber = 4, - kProtocolFieldNumber = 6, - kSourcePortFieldNumber = 3, - kDestinationPortFieldNumber = 5, - }; - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // optional string source_ip = 2; - bool has_source_ip() const; - private: - bool _internal_has_source_ip() const; - public: - void clear_source_ip(); - const std::string& source_ip() const; - template - void set_source_ip(ArgT0&& arg0, ArgT... args); - std::string* mutable_source_ip(); - PROTOBUF_NODISCARD std::string* release_source_ip(); - void set_allocated_source_ip(std::string* source_ip); - private: - const std::string& _internal_source_ip() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_source_ip(const std::string& value); - std::string* _internal_mutable_source_ip(); - public: - - // optional string destination_ip = 4; - bool has_destination_ip() const; - private: - bool _internal_has_destination_ip() const; - public: - void clear_destination_ip(); - const std::string& destination_ip() const; - template - void set_destination_ip(ArgT0&& arg0, ArgT... args); - std::string* mutable_destination_ip(); - PROTOBUF_NODISCARD std::string* release_destination_ip(); - void set_allocated_destination_ip(std::string* destination_ip); - private: - const std::string& _internal_destination_ip() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_destination_ip(const std::string& value); - std::string* _internal_mutable_destination_ip(); - public: - - // string protocol = 6; - void clear_protocol(); - const std::string& protocol() const; - template - void set_protocol(ArgT0&& arg0, ArgT... args); - std::string* mutable_protocol(); - PROTOBUF_NODISCARD std::string* release_protocol(); - void set_allocated_protocol(std::string* protocol); - private: - const std::string& _internal_protocol() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_protocol(const std::string& value); - std::string* _internal_mutable_protocol(); - public: - - // optional uint32 source_port = 3; - bool has_source_port() const; - private: - bool _internal_has_source_port() const; - public: - void clear_source_port(); - uint32_t source_port() const; - void set_source_port(uint32_t value); - private: - uint32_t _internal_source_port() const; - void _internal_set_source_port(uint32_t value); - public: - - // optional uint32 destination_port = 5; - bool has_destination_port() const; - private: - bool _internal_has_destination_port() const; - public: - void clear_destination_port(); - uint32_t destination_port() const; - void set_destination_port(uint32_t value); - private: - uint32_t _internal_destination_port() const; - void _internal_set_destination_port(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpConnection) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_ip_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr destination_ip_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocol_; - uint32_t source_port_; - uint32_t destination_port_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardIpInfo final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardIpInfo) */ { - public: - inline AppGuardIpInfo() : AppGuardIpInfo(nullptr) {} - ~AppGuardIpInfo() override; - explicit PROTOBUF_CONSTEXPR AppGuardIpInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardIpInfo(const AppGuardIpInfo& from); - AppGuardIpInfo(AppGuardIpInfo&& from) noexcept - : AppGuardIpInfo() { - *this = ::std::move(from); - } - - inline AppGuardIpInfo& operator=(const AppGuardIpInfo& from) { - CopyFrom(from); - return *this; - } - inline AppGuardIpInfo& operator=(AppGuardIpInfo&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardIpInfo& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardIpInfo* internal_default_instance() { - return reinterpret_cast( - &_AppGuardIpInfo_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(AppGuardIpInfo& a, AppGuardIpInfo& b) { - a.Swap(&b); - } - inline void Swap(AppGuardIpInfo* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardIpInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardIpInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardIpInfo& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardIpInfo& from) { - AppGuardIpInfo::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardIpInfo* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardIpInfo"; - } - protected: - explicit AppGuardIpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kIpFieldNumber = 1, - kCountryFieldNumber = 2, - kAsnFieldNumber = 3, - kOrgFieldNumber = 4, - kContinentCodeFieldNumber = 5, - kCityFieldNumber = 6, - kRegionFieldNumber = 7, - kPostalFieldNumber = 8, - kTimezoneFieldNumber = 9, - kBlacklistFieldNumber = 100, - }; - // string ip = 1; - void clear_ip(); - const std::string& ip() const; - template - void set_ip(ArgT0&& arg0, ArgT... args); - std::string* mutable_ip(); - PROTOBUF_NODISCARD std::string* release_ip(); - void set_allocated_ip(std::string* ip); - private: - const std::string& _internal_ip() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_ip(const std::string& value); - std::string* _internal_mutable_ip(); - public: - - // optional string country = 2; - bool has_country() const; - private: - bool _internal_has_country() const; - public: - void clear_country(); - const std::string& country() const; - template - void set_country(ArgT0&& arg0, ArgT... args); - std::string* mutable_country(); - PROTOBUF_NODISCARD std::string* release_country(); - void set_allocated_country(std::string* country); - private: - const std::string& _internal_country() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_country(const std::string& value); - std::string* _internal_mutable_country(); - public: - - // optional string asn = 3; - bool has_asn() const; - private: - bool _internal_has_asn() const; - public: - void clear_asn(); - const std::string& asn() const; - template - void set_asn(ArgT0&& arg0, ArgT... args); - std::string* mutable_asn(); - PROTOBUF_NODISCARD std::string* release_asn(); - void set_allocated_asn(std::string* asn); - private: - const std::string& _internal_asn() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_asn(const std::string& value); - std::string* _internal_mutable_asn(); - public: - - // optional string org = 4; - bool has_org() const; - private: - bool _internal_has_org() const; - public: - void clear_org(); - const std::string& org() const; - template - void set_org(ArgT0&& arg0, ArgT... args); - std::string* mutable_org(); - PROTOBUF_NODISCARD std::string* release_org(); - void set_allocated_org(std::string* org); - private: - const std::string& _internal_org() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_org(const std::string& value); - std::string* _internal_mutable_org(); - public: - - // optional string continent_code = 5; - bool has_continent_code() const; - private: - bool _internal_has_continent_code() const; - public: - void clear_continent_code(); - const std::string& continent_code() const; - template - void set_continent_code(ArgT0&& arg0, ArgT... args); - std::string* mutable_continent_code(); - PROTOBUF_NODISCARD std::string* release_continent_code(); - void set_allocated_continent_code(std::string* continent_code); - private: - const std::string& _internal_continent_code() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_continent_code(const std::string& value); - std::string* _internal_mutable_continent_code(); - public: - - // optional string city = 6; - bool has_city() const; - private: - bool _internal_has_city() const; - public: - void clear_city(); - const std::string& city() const; - template - void set_city(ArgT0&& arg0, ArgT... args); - std::string* mutable_city(); - PROTOBUF_NODISCARD std::string* release_city(); - void set_allocated_city(std::string* city); - private: - const std::string& _internal_city() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_city(const std::string& value); - std::string* _internal_mutable_city(); - public: - - // optional string region = 7; - bool has_region() const; - private: - bool _internal_has_region() const; - public: - void clear_region(); - const std::string& region() const; - template - void set_region(ArgT0&& arg0, ArgT... args); - std::string* mutable_region(); - PROTOBUF_NODISCARD std::string* release_region(); - void set_allocated_region(std::string* region); - private: - const std::string& _internal_region() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_region(const std::string& value); - std::string* _internal_mutable_region(); - public: - - // optional string postal = 8; - bool has_postal() const; - private: - bool _internal_has_postal() const; - public: - void clear_postal(); - const std::string& postal() const; - template - void set_postal(ArgT0&& arg0, ArgT... args); - std::string* mutable_postal(); - PROTOBUF_NODISCARD std::string* release_postal(); - void set_allocated_postal(std::string* postal); - private: - const std::string& _internal_postal() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_postal(const std::string& value); - std::string* _internal_mutable_postal(); - public: - - // optional string timezone = 9; - bool has_timezone() const; - private: - bool _internal_has_timezone() const; - public: - void clear_timezone(); - const std::string& timezone() const; - template - void set_timezone(ArgT0&& arg0, ArgT... args); - std::string* mutable_timezone(); - PROTOBUF_NODISCARD std::string* release_timezone(); - void set_allocated_timezone(std::string* timezone); - private: - const std::string& _internal_timezone() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_timezone(const std::string& value); - std::string* _internal_mutable_timezone(); - public: - - // bool blacklist = 100; - void clear_blacklist(); - bool blacklist() const; - void set_blacklist(bool value); - private: - bool _internal_blacklist() const; - void _internal_set_blacklist(bool value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardIpInfo) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ip_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr asn_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr org_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr continent_code_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr city_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr postal_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr timezone_; - bool blacklist_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardTcpInfo final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpInfo) */ { - public: - inline AppGuardTcpInfo() : AppGuardTcpInfo(nullptr) {} - ~AppGuardTcpInfo() override; - explicit PROTOBUF_CONSTEXPR AppGuardTcpInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardTcpInfo(const AppGuardTcpInfo& from); - AppGuardTcpInfo(AppGuardTcpInfo&& from) noexcept - : AppGuardTcpInfo() { - *this = ::std::move(from); - } - - inline AppGuardTcpInfo& operator=(const AppGuardTcpInfo& from) { - CopyFrom(from); - return *this; - } - inline AppGuardTcpInfo& operator=(AppGuardTcpInfo&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardTcpInfo& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardTcpInfo* internal_default_instance() { - return reinterpret_cast( - &_AppGuardTcpInfo_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(AppGuardTcpInfo& a, AppGuardTcpInfo& b) { - a.Swap(&b); - } - inline void Swap(AppGuardTcpInfo* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardTcpInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardTcpInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardTcpInfo& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardTcpInfo& from) { - AppGuardTcpInfo::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardTcpInfo* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardTcpInfo"; - } - protected: - explicit AppGuardTcpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kConnectionFieldNumber = 1, - kIpInfoFieldNumber = 2, - kTcpIdFieldNumber = 3, - }; - // .appguard.AppGuardTcpConnection connection = 1; - bool has_connection() const; - private: - bool _internal_has_connection() const; - public: - void clear_connection(); - const ::appguard::AppGuardTcpConnection& connection() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpConnection* release_connection(); - ::appguard::AppGuardTcpConnection* mutable_connection(); - void set_allocated_connection(::appguard::AppGuardTcpConnection* connection); - private: - const ::appguard::AppGuardTcpConnection& _internal_connection() const; - ::appguard::AppGuardTcpConnection* _internal_mutable_connection(); - public: - void unsafe_arena_set_allocated_connection( - ::appguard::AppGuardTcpConnection* connection); - ::appguard::AppGuardTcpConnection* unsafe_arena_release_connection(); - - // .appguard.AppGuardIpInfo ip_info = 2; - bool has_ip_info() const; - private: - bool _internal_has_ip_info() const; - public: - void clear_ip_info(); - const ::appguard::AppGuardIpInfo& ip_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardIpInfo* release_ip_info(); - ::appguard::AppGuardIpInfo* mutable_ip_info(); - void set_allocated_ip_info(::appguard::AppGuardIpInfo* ip_info); - private: - const ::appguard::AppGuardIpInfo& _internal_ip_info() const; - ::appguard::AppGuardIpInfo* _internal_mutable_ip_info(); - public: - void unsafe_arena_set_allocated_ip_info( - ::appguard::AppGuardIpInfo* ip_info); - ::appguard::AppGuardIpInfo* unsafe_arena_release_ip_info(); - - // uint64 tcp_id = 3; - void clear_tcp_id(); - uint64_t tcp_id() const; - void set_tcp_id(uint64_t value); - private: - uint64_t _internal_tcp_id() const; - void _internal_set_tcp_id(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpInfo) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::appguard::AppGuardTcpConnection* connection_; - ::appguard::AppGuardIpInfo* ip_info_; - uint64_t tcp_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardHttpRequest_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - AppGuardHttpRequest_HeadersEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR AppGuardHttpRequest_HeadersEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit AppGuardHttpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const AppGuardHttpRequest_HeadersEntry_DoNotUse& other); - static const AppGuardHttpRequest_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.HeadersEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.HeadersEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_appguard_2eproto; -}; - -// ------------------------------------------------------------------- - -class AppGuardHttpRequest_QueryEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - AppGuardHttpRequest_QueryEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR AppGuardHttpRequest_QueryEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit AppGuardHttpRequest_QueryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const AppGuardHttpRequest_QueryEntry_DoNotUse& other); - static const AppGuardHttpRequest_QueryEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.QueryEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.QueryEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_appguard_2eproto; -}; - -// ------------------------------------------------------------------- - -class AppGuardHttpRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardHttpRequest) */ { - public: - inline AppGuardHttpRequest() : AppGuardHttpRequest(nullptr) {} - ~AppGuardHttpRequest() override; - explicit PROTOBUF_CONSTEXPR AppGuardHttpRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardHttpRequest(const AppGuardHttpRequest& from); - AppGuardHttpRequest(AppGuardHttpRequest&& from) noexcept - : AppGuardHttpRequest() { - *this = ::std::move(from); - } - - inline AppGuardHttpRequest& operator=(const AppGuardHttpRequest& from) { - CopyFrom(from); - return *this; - } - inline AppGuardHttpRequest& operator=(AppGuardHttpRequest&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardHttpRequest& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardHttpRequest* internal_default_instance() { - return reinterpret_cast( - &_AppGuardHttpRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(AppGuardHttpRequest& a, AppGuardHttpRequest& b) { - a.Swap(&b); - } - inline void Swap(AppGuardHttpRequest* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardHttpRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardHttpRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardHttpRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardHttpRequest& from) { - AppGuardHttpRequest::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardHttpRequest* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardHttpRequest"; - } - protected: - explicit AppGuardHttpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kHeadersFieldNumber = 3, - kQueryFieldNumber = 6, - kTokenFieldNumber = 1, - kOriginalUrlFieldNumber = 2, - kMethodFieldNumber = 4, - kBodyFieldNumber = 5, - kTcpInfoFieldNumber = 100, - }; - // map headers = 3; - int headers_size() const; - private: - int _internal_headers_size() const; - public: - void clear_headers(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_headers(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_headers(); - - // map query = 6; - int query_size() const; - private: - int _internal_query_size() const; - public: - void clear_query(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_query() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_query(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - query() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_query(); - - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // string original_url = 2; - void clear_original_url(); - const std::string& original_url() const; - template - void set_original_url(ArgT0&& arg0, ArgT... args); - std::string* mutable_original_url(); - PROTOBUF_NODISCARD std::string* release_original_url(); - void set_allocated_original_url(std::string* original_url); - private: - const std::string& _internal_original_url() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_original_url(const std::string& value); - std::string* _internal_mutable_original_url(); - public: - - // string method = 4; - void clear_method(); - const std::string& method() const; - template - void set_method(ArgT0&& arg0, ArgT... args); - std::string* mutable_method(); - PROTOBUF_NODISCARD std::string* release_method(); - void set_allocated_method(std::string* method); - private: - const std::string& _internal_method() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_method(const std::string& value); - std::string* _internal_mutable_method(); - public: - - // optional string body = 5; - bool has_body() const; - private: - bool _internal_has_body() const; - public: - void clear_body(); - const std::string& body() const; - template - void set_body(ArgT0&& arg0, ArgT... args); - std::string* mutable_body(); - PROTOBUF_NODISCARD std::string* release_body(); - void set_allocated_body(std::string* body); - private: - const std::string& _internal_body() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); - std::string* _internal_mutable_body(); - public: - - // .appguard.AppGuardTcpInfo tcp_info = 100; - bool has_tcp_info() const; - private: - bool _internal_has_tcp_info() const; - public: - void clear_tcp_info(); - const ::appguard::AppGuardTcpInfo& tcp_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpInfo* release_tcp_info(); - ::appguard::AppGuardTcpInfo* mutable_tcp_info(); - void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); - private: - const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; - ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); - public: - void unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info); - ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); - - // @@protoc_insertion_point(class_scope:appguard.AppGuardHttpRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - AppGuardHttpRequest_HeadersEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> headers_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - AppGuardHttpRequest_QueryEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> query_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr original_url_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr method_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; - ::appguard::AppGuardTcpInfo* tcp_info_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardHttpResponse_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - AppGuardHttpResponse_HeadersEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR AppGuardHttpResponse_HeadersEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit AppGuardHttpResponse_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const AppGuardHttpResponse_HeadersEntry_DoNotUse& other); - static const AppGuardHttpResponse_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpResponse.HeadersEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpResponse.HeadersEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_appguard_2eproto; -}; - -// ------------------------------------------------------------------- - -class AppGuardHttpResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardHttpResponse) */ { - public: - inline AppGuardHttpResponse() : AppGuardHttpResponse(nullptr) {} - ~AppGuardHttpResponse() override; - explicit PROTOBUF_CONSTEXPR AppGuardHttpResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardHttpResponse(const AppGuardHttpResponse& from); - AppGuardHttpResponse(AppGuardHttpResponse&& from) noexcept - : AppGuardHttpResponse() { - *this = ::std::move(from); - } - - inline AppGuardHttpResponse& operator=(const AppGuardHttpResponse& from) { - CopyFrom(from); - return *this; - } - inline AppGuardHttpResponse& operator=(AppGuardHttpResponse&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardHttpResponse& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardHttpResponse* internal_default_instance() { - return reinterpret_cast( - &_AppGuardHttpResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(AppGuardHttpResponse& a, AppGuardHttpResponse& b) { - a.Swap(&b); - } - inline void Swap(AppGuardHttpResponse* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardHttpResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardHttpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardHttpResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardHttpResponse& from) { - AppGuardHttpResponse::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardHttpResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardHttpResponse"; - } - protected: - explicit AppGuardHttpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kHeadersFieldNumber = 3, - kTokenFieldNumber = 1, - kTcpInfoFieldNumber = 100, - kCodeFieldNumber = 2, - }; - // map headers = 3; - int headers_size() const; - private: - int _internal_headers_size() const; - public: - void clear_headers(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_headers(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_headers(); - - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // .appguard.AppGuardTcpInfo tcp_info = 100; - bool has_tcp_info() const; - private: - bool _internal_has_tcp_info() const; - public: - void clear_tcp_info(); - const ::appguard::AppGuardTcpInfo& tcp_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpInfo* release_tcp_info(); - ::appguard::AppGuardTcpInfo* mutable_tcp_info(); - void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); - private: - const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; - ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); - public: - void unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info); - ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); - - // uint32 code = 2; - void clear_code(); - uint32_t code() const; - void set_code(uint32_t value); - private: - uint32_t _internal_code() const; - void _internal_set_code(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardHttpResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - AppGuardHttpResponse_HeadersEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> headers_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - ::appguard::AppGuardTcpInfo* tcp_info_; - uint32_t code_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardSmtpRequest_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - AppGuardSmtpRequest_HeadersEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR AppGuardSmtpRequest_HeadersEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit AppGuardSmtpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const AppGuardSmtpRequest_HeadersEntry_DoNotUse& other); - static const AppGuardSmtpRequest_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardSmtpRequest.HeadersEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardSmtpRequest.HeadersEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_appguard_2eproto; -}; - -// ------------------------------------------------------------------- - -class AppGuardSmtpRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardSmtpRequest) */ { - public: - inline AppGuardSmtpRequest() : AppGuardSmtpRequest(nullptr) {} - ~AppGuardSmtpRequest() override; - explicit PROTOBUF_CONSTEXPR AppGuardSmtpRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardSmtpRequest(const AppGuardSmtpRequest& from); - AppGuardSmtpRequest(AppGuardSmtpRequest&& from) noexcept - : AppGuardSmtpRequest() { - *this = ::std::move(from); - } - - inline AppGuardSmtpRequest& operator=(const AppGuardSmtpRequest& from) { - CopyFrom(from); - return *this; - } - inline AppGuardSmtpRequest& operator=(AppGuardSmtpRequest&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardSmtpRequest& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardSmtpRequest* internal_default_instance() { - return reinterpret_cast( - &_AppGuardSmtpRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(AppGuardSmtpRequest& a, AppGuardSmtpRequest& b) { - a.Swap(&b); - } - inline void Swap(AppGuardSmtpRequest* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardSmtpRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardSmtpRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardSmtpRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardSmtpRequest& from) { - AppGuardSmtpRequest::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardSmtpRequest* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardSmtpRequest"; - } - protected: - explicit AppGuardSmtpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kHeadersFieldNumber = 2, - kTokenFieldNumber = 1, - kBodyFieldNumber = 3, - kTcpInfoFieldNumber = 100, - }; - // map headers = 2; - int headers_size() const; - private: - int _internal_headers_size() const; - public: - void clear_headers(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_headers(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - headers() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_headers(); - - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // optional string body = 3; - bool has_body() const; - private: - bool _internal_has_body() const; - public: - void clear_body(); - const std::string& body() const; - template - void set_body(ArgT0&& arg0, ArgT... args); - std::string* mutable_body(); - PROTOBUF_NODISCARD std::string* release_body(); - void set_allocated_body(std::string* body); - private: - const std::string& _internal_body() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); - std::string* _internal_mutable_body(); - public: - - // .appguard.AppGuardTcpInfo tcp_info = 100; - bool has_tcp_info() const; - private: - bool _internal_has_tcp_info() const; - public: - void clear_tcp_info(); - const ::appguard::AppGuardTcpInfo& tcp_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpInfo* release_tcp_info(); - ::appguard::AppGuardTcpInfo* mutable_tcp_info(); - void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); - private: - const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; - ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); - public: - void unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info); - ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); - - // @@protoc_insertion_point(class_scope:appguard.AppGuardSmtpRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - AppGuardSmtpRequest_HeadersEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> headers_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; - ::appguard::AppGuardTcpInfo* tcp_info_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardSmtpResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardSmtpResponse) */ { - public: - inline AppGuardSmtpResponse() : AppGuardSmtpResponse(nullptr) {} - ~AppGuardSmtpResponse() override; - explicit PROTOBUF_CONSTEXPR AppGuardSmtpResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardSmtpResponse(const AppGuardSmtpResponse& from); - AppGuardSmtpResponse(AppGuardSmtpResponse&& from) noexcept - : AppGuardSmtpResponse() { - *this = ::std::move(from); - } - - inline AppGuardSmtpResponse& operator=(const AppGuardSmtpResponse& from) { - CopyFrom(from); - return *this; - } - inline AppGuardSmtpResponse& operator=(AppGuardSmtpResponse&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardSmtpResponse& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardSmtpResponse* internal_default_instance() { - return reinterpret_cast( - &_AppGuardSmtpResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 12; - - friend void swap(AppGuardSmtpResponse& a, AppGuardSmtpResponse& b) { - a.Swap(&b); - } - inline void Swap(AppGuardSmtpResponse* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardSmtpResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardSmtpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardSmtpResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardSmtpResponse& from) { - AppGuardSmtpResponse::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardSmtpResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardSmtpResponse"; - } - protected: - explicit AppGuardSmtpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTokenFieldNumber = 1, - kTcpInfoFieldNumber = 100, - kCodeFieldNumber = 2, - }; - // string token = 1; - void clear_token(); - const std::string& token() const; - template - void set_token(ArgT0&& arg0, ArgT... args); - std::string* mutable_token(); - PROTOBUF_NODISCARD std::string* release_token(); - void set_allocated_token(std::string* token); - private: - const std::string& _internal_token() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_token(const std::string& value); - std::string* _internal_mutable_token(); - public: - - // .appguard.AppGuardTcpInfo tcp_info = 100; - bool has_tcp_info() const; - private: - bool _internal_has_tcp_info() const; - public: - void clear_tcp_info(); - const ::appguard::AppGuardTcpInfo& tcp_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpInfo* release_tcp_info(); - ::appguard::AppGuardTcpInfo* mutable_tcp_info(); - void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); - private: - const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; - ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); - public: - void unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info); - ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); - - // optional uint32 code = 2; - bool has_code() const; - private: - bool _internal_has_code() const; - public: - void clear_code(); - uint32_t code() const; - void set_code(uint32_t value); - private: - uint32_t _internal_code() const; - void _internal_set_code(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardSmtpResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; - ::appguard::AppGuardTcpInfo* tcp_info_; - uint32_t code_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardResponse) */ { - public: - inline AppGuardResponse() : AppGuardResponse(nullptr) {} - ~AppGuardResponse() override; - explicit PROTOBUF_CONSTEXPR AppGuardResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardResponse(const AppGuardResponse& from); - AppGuardResponse(AppGuardResponse&& from) noexcept - : AppGuardResponse() { - *this = ::std::move(from); - } - - inline AppGuardResponse& operator=(const AppGuardResponse& from) { - CopyFrom(from); - return *this; - } - inline AppGuardResponse& operator=(AppGuardResponse&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardResponse& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardResponse* internal_default_instance() { - return reinterpret_cast( - &_AppGuardResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(AppGuardResponse& a, AppGuardResponse& b) { - a.Swap(&b); - } - inline void Swap(AppGuardResponse* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardResponse& from) { - AppGuardResponse::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardResponse"; - } - protected: - explicit AppGuardResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPolicyFieldNumber = 2, - }; - // .appguard.FirewallPolicy policy = 2; - void clear_policy(); - ::appguard::FirewallPolicy policy() const; - void set_policy(::appguard::FirewallPolicy value); - private: - ::appguard::FirewallPolicy _internal_policy() const; - void _internal_set_policy(::appguard::FirewallPolicy value); - public: - - // @@protoc_insertion_point(class_scope:appguard.AppGuardResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - int policy_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// ------------------------------------------------------------------- - -class AppGuardTcpResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpResponse) */ { - public: - inline AppGuardTcpResponse() : AppGuardTcpResponse(nullptr) {} - ~AppGuardTcpResponse() override; - explicit PROTOBUF_CONSTEXPR AppGuardTcpResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - AppGuardTcpResponse(const AppGuardTcpResponse& from); - AppGuardTcpResponse(AppGuardTcpResponse&& from) noexcept - : AppGuardTcpResponse() { - *this = ::std::move(from); - } - - inline AppGuardTcpResponse& operator=(const AppGuardTcpResponse& from) { - CopyFrom(from); - return *this; - } - inline AppGuardTcpResponse& operator=(AppGuardTcpResponse&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AppGuardTcpResponse& default_instance() { - return *internal_default_instance(); - } - static inline const AppGuardTcpResponse* internal_default_instance() { - return reinterpret_cast( - &_AppGuardTcpResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 14; - - friend void swap(AppGuardTcpResponse& a, AppGuardTcpResponse& b) { - a.Swap(&b); - } - inline void Swap(AppGuardTcpResponse* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AppGuardTcpResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AppGuardTcpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const AppGuardTcpResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const AppGuardTcpResponse& from) { - AppGuardTcpResponse::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(AppGuardTcpResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "appguard.AppGuardTcpResponse"; - } - protected: - explicit AppGuardTcpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTcpInfoFieldNumber = 1, - }; - // .appguard.AppGuardTcpInfo tcp_info = 1; - bool has_tcp_info() const; - private: - bool _internal_has_tcp_info() const; - public: - void clear_tcp_info(); - const ::appguard::AppGuardTcpInfo& tcp_info() const; - PROTOBUF_NODISCARD ::appguard::AppGuardTcpInfo* release_tcp_info(); - ::appguard::AppGuardTcpInfo* mutable_tcp_info(); - void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); - private: - const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; - ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); - public: - void unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info); - ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); - - // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::appguard::AppGuardTcpInfo* tcp_info_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_appguard_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// HeartbeatRequest - -// string app_id = 1; -inline void HeartbeatRequest::clear_app_id() { - _impl_.app_id_.ClearToEmpty(); -} -inline const std::string& HeartbeatRequest::app_id() const { - // @@protoc_insertion_point(field_get:appguard.HeartbeatRequest.app_id) - return _internal_app_id(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeartbeatRequest::set_app_id(ArgT0&& arg0, ArgT... args) { - - _impl_.app_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.HeartbeatRequest.app_id) -} -inline std::string* HeartbeatRequest::mutable_app_id() { - std::string* _s = _internal_mutable_app_id(); - // @@protoc_insertion_point(field_mutable:appguard.HeartbeatRequest.app_id) - return _s; -} -inline const std::string& HeartbeatRequest::_internal_app_id() const { - return _impl_.app_id_.Get(); -} -inline void HeartbeatRequest::_internal_set_app_id(const std::string& value) { - - _impl_.app_id_.Set(value, GetArenaForAllocation()); -} -inline std::string* HeartbeatRequest::_internal_mutable_app_id() { - - return _impl_.app_id_.Mutable(GetArenaForAllocation()); -} -inline std::string* HeartbeatRequest::release_app_id() { - // @@protoc_insertion_point(field_release:appguard.HeartbeatRequest.app_id) - return _impl_.app_id_.Release(); -} -inline void HeartbeatRequest::set_allocated_app_id(std::string* app_id) { - if (app_id != nullptr) { - - } else { - - } - _impl_.app_id_.SetAllocated(app_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.app_id_.IsDefault()) { - _impl_.app_id_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.HeartbeatRequest.app_id) -} - -// string app_secret = 2; -inline void HeartbeatRequest::clear_app_secret() { - _impl_.app_secret_.ClearToEmpty(); -} -inline const std::string& HeartbeatRequest::app_secret() const { - // @@protoc_insertion_point(field_get:appguard.HeartbeatRequest.app_secret) - return _internal_app_secret(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeartbeatRequest::set_app_secret(ArgT0&& arg0, ArgT... args) { - - _impl_.app_secret_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.HeartbeatRequest.app_secret) -} -inline std::string* HeartbeatRequest::mutable_app_secret() { - std::string* _s = _internal_mutable_app_secret(); - // @@protoc_insertion_point(field_mutable:appguard.HeartbeatRequest.app_secret) - return _s; -} -inline const std::string& HeartbeatRequest::_internal_app_secret() const { - return _impl_.app_secret_.Get(); -} -inline void HeartbeatRequest::_internal_set_app_secret(const std::string& value) { - - _impl_.app_secret_.Set(value, GetArenaForAllocation()); -} -inline std::string* HeartbeatRequest::_internal_mutable_app_secret() { - - return _impl_.app_secret_.Mutable(GetArenaForAllocation()); -} -inline std::string* HeartbeatRequest::release_app_secret() { - // @@protoc_insertion_point(field_release:appguard.HeartbeatRequest.app_secret) - return _impl_.app_secret_.Release(); -} -inline void HeartbeatRequest::set_allocated_app_secret(std::string* app_secret) { - if (app_secret != nullptr) { - - } else { - - } - _impl_.app_secret_.SetAllocated(app_secret, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.app_secret_.IsDefault()) { - _impl_.app_secret_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.HeartbeatRequest.app_secret) -} - -// ------------------------------------------------------------------- - -// HeartbeatResponse - -// string token = 1; -inline void HeartbeatResponse::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& HeartbeatResponse::token() const { - // @@protoc_insertion_point(field_get:appguard.HeartbeatResponse.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeartbeatResponse::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.HeartbeatResponse.token) -} -inline std::string* HeartbeatResponse::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.HeartbeatResponse.token) - return _s; -} -inline const std::string& HeartbeatResponse::_internal_token() const { - return _impl_.token_.Get(); -} -inline void HeartbeatResponse::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* HeartbeatResponse::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* HeartbeatResponse::release_token() { - // @@protoc_insertion_point(field_release:appguard.HeartbeatResponse.token) - return _impl_.token_.Release(); -} -inline void HeartbeatResponse::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.HeartbeatResponse.token) -} - -// .appguard.DeviceStatus status = 2; -inline void HeartbeatResponse::clear_status() { - _impl_.status_ = 0; -} -inline ::appguard::DeviceStatus HeartbeatResponse::_internal_status() const { - return static_cast< ::appguard::DeviceStatus >(_impl_.status_); -} -inline ::appguard::DeviceStatus HeartbeatResponse::status() const { - // @@protoc_insertion_point(field_get:appguard.HeartbeatResponse.status) - return _internal_status(); -} -inline void HeartbeatResponse::_internal_set_status(::appguard::DeviceStatus value) { - - _impl_.status_ = value; -} -inline void HeartbeatResponse::set_status(::appguard::DeviceStatus value) { - _internal_set_status(value); - // @@protoc_insertion_point(field_set:appguard.HeartbeatResponse.status) -} - -// ------------------------------------------------------------------- - -// AppGuardTcpConnection - -// string token = 1; -inline void AppGuardTcpConnection::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& AppGuardTcpConnection::token() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardTcpConnection::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.token) -} -inline std::string* AppGuardTcpConnection::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.token) - return _s; -} -inline const std::string& AppGuardTcpConnection::_internal_token() const { - return _impl_.token_.Get(); -} -inline void AppGuardTcpConnection::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::release_token() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.token) - return _impl_.token_.Release(); -} -inline void AppGuardTcpConnection::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.token) -} - -// optional string source_ip = 2; -inline bool AppGuardTcpConnection::_internal_has_source_ip() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppGuardTcpConnection::has_source_ip() const { - return _internal_has_source_ip(); -} -inline void AppGuardTcpConnection::clear_source_ip() { - _impl_.source_ip_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& AppGuardTcpConnection::source_ip() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.source_ip) - return _internal_source_ip(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardTcpConnection::set_source_ip(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.source_ip_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.source_ip) -} -inline std::string* AppGuardTcpConnection::mutable_source_ip() { - std::string* _s = _internal_mutable_source_ip(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.source_ip) - return _s; -} -inline const std::string& AppGuardTcpConnection::_internal_source_ip() const { - return _impl_.source_ip_.Get(); -} -inline void AppGuardTcpConnection::_internal_set_source_ip(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.source_ip_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::_internal_mutable_source_ip() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.source_ip_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::release_source_ip() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.source_ip) - if (!_internal_has_source_ip()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.source_ip_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.source_ip_.IsDefault()) { - _impl_.source_ip_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardTcpConnection::set_allocated_source_ip(std::string* source_ip) { - if (source_ip != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.source_ip_.SetAllocated(source_ip, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.source_ip_.IsDefault()) { - _impl_.source_ip_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.source_ip) -} - -// optional uint32 source_port = 3; -inline bool AppGuardTcpConnection::_internal_has_source_port() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool AppGuardTcpConnection::has_source_port() const { - return _internal_has_source_port(); -} -inline void AppGuardTcpConnection::clear_source_port() { - _impl_.source_port_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline uint32_t AppGuardTcpConnection::_internal_source_port() const { - return _impl_.source_port_; -} -inline uint32_t AppGuardTcpConnection::source_port() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.source_port) - return _internal_source_port(); -} -inline void AppGuardTcpConnection::_internal_set_source_port(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.source_port_ = value; -} -inline void AppGuardTcpConnection::set_source_port(uint32_t value) { - _internal_set_source_port(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.source_port) -} - -// optional string destination_ip = 4; -inline bool AppGuardTcpConnection::_internal_has_destination_ip() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppGuardTcpConnection::has_destination_ip() const { - return _internal_has_destination_ip(); -} -inline void AppGuardTcpConnection::clear_destination_ip() { - _impl_.destination_ip_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const std::string& AppGuardTcpConnection::destination_ip() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.destination_ip) - return _internal_destination_ip(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardTcpConnection::set_destination_ip(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.destination_ip_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.destination_ip) -} -inline std::string* AppGuardTcpConnection::mutable_destination_ip() { - std::string* _s = _internal_mutable_destination_ip(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.destination_ip) - return _s; -} -inline const std::string& AppGuardTcpConnection::_internal_destination_ip() const { - return _impl_.destination_ip_.Get(); -} -inline void AppGuardTcpConnection::_internal_set_destination_ip(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.destination_ip_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::_internal_mutable_destination_ip() { - _impl_._has_bits_[0] |= 0x00000002u; - return _impl_.destination_ip_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::release_destination_ip() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.destination_ip) - if (!_internal_has_destination_ip()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000002u; - auto* p = _impl_.destination_ip_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.destination_ip_.IsDefault()) { - _impl_.destination_ip_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardTcpConnection::set_allocated_destination_ip(std::string* destination_ip) { - if (destination_ip != nullptr) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.destination_ip_.SetAllocated(destination_ip, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.destination_ip_.IsDefault()) { - _impl_.destination_ip_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.destination_ip) -} - -// optional uint32 destination_port = 5; -inline bool AppGuardTcpConnection::_internal_has_destination_port() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool AppGuardTcpConnection::has_destination_port() const { - return _internal_has_destination_port(); -} -inline void AppGuardTcpConnection::clear_destination_port() { - _impl_.destination_port_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline uint32_t AppGuardTcpConnection::_internal_destination_port() const { - return _impl_.destination_port_; -} -inline uint32_t AppGuardTcpConnection::destination_port() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.destination_port) - return _internal_destination_port(); -} -inline void AppGuardTcpConnection::_internal_set_destination_port(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.destination_port_ = value; -} -inline void AppGuardTcpConnection::set_destination_port(uint32_t value) { - _internal_set_destination_port(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.destination_port) -} - -// string protocol = 6; -inline void AppGuardTcpConnection::clear_protocol() { - _impl_.protocol_.ClearToEmpty(); -} -inline const std::string& AppGuardTcpConnection::protocol() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.protocol) - return _internal_protocol(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardTcpConnection::set_protocol(ArgT0&& arg0, ArgT... args) { - - _impl_.protocol_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.protocol) -} -inline std::string* AppGuardTcpConnection::mutable_protocol() { - std::string* _s = _internal_mutable_protocol(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.protocol) - return _s; -} -inline const std::string& AppGuardTcpConnection::_internal_protocol() const { - return _impl_.protocol_.Get(); -} -inline void AppGuardTcpConnection::_internal_set_protocol(const std::string& value) { - - _impl_.protocol_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::_internal_mutable_protocol() { - - return _impl_.protocol_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardTcpConnection::release_protocol() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.protocol) - return _impl_.protocol_.Release(); -} -inline void AppGuardTcpConnection::set_allocated_protocol(std::string* protocol) { - if (protocol != nullptr) { - - } else { - - } - _impl_.protocol_.SetAllocated(protocol, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.protocol_.IsDefault()) { - _impl_.protocol_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.protocol) -} - -// ------------------------------------------------------------------- - -// AppGuardIpInfo - -// string ip = 1; -inline void AppGuardIpInfo::clear_ip() { - _impl_.ip_.ClearToEmpty(); -} -inline const std::string& AppGuardIpInfo::ip() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.ip) - return _internal_ip(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_ip(ArgT0&& arg0, ArgT... args) { - - _impl_.ip_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.ip) -} -inline std::string* AppGuardIpInfo::mutable_ip() { - std::string* _s = _internal_mutable_ip(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.ip) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_ip() const { - return _impl_.ip_.Get(); -} -inline void AppGuardIpInfo::_internal_set_ip(const std::string& value) { - - _impl_.ip_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_ip() { - - return _impl_.ip_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_ip() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.ip) - return _impl_.ip_.Release(); -} -inline void AppGuardIpInfo::set_allocated_ip(std::string* ip) { - if (ip != nullptr) { - - } else { - - } - _impl_.ip_.SetAllocated(ip, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.ip_.IsDefault()) { - _impl_.ip_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.ip) -} - -// optional string country = 2; -inline bool AppGuardIpInfo::_internal_has_country() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_country() const { - return _internal_has_country(); -} -inline void AppGuardIpInfo::clear_country() { - _impl_.country_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& AppGuardIpInfo::country() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.country) - return _internal_country(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_country(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.country_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.country) -} -inline std::string* AppGuardIpInfo::mutable_country() { - std::string* _s = _internal_mutable_country(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.country) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_country() const { - return _impl_.country_.Get(); -} -inline void AppGuardIpInfo::_internal_set_country(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.country_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_country() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.country_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_country() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.country) - if (!_internal_has_country()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.country_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.country_.IsDefault()) { - _impl_.country_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_country(std::string* country) { - if (country != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.country_.SetAllocated(country, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.country_.IsDefault()) { - _impl_.country_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.country) -} - -// optional string asn = 3; -inline bool AppGuardIpInfo::_internal_has_asn() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_asn() const { - return _internal_has_asn(); -} -inline void AppGuardIpInfo::clear_asn() { - _impl_.asn_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline const std::string& AppGuardIpInfo::asn() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.asn) - return _internal_asn(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_asn(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.asn_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.asn) -} -inline std::string* AppGuardIpInfo::mutable_asn() { - std::string* _s = _internal_mutable_asn(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.asn) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_asn() const { - return _impl_.asn_.Get(); -} -inline void AppGuardIpInfo::_internal_set_asn(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.asn_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_asn() { - _impl_._has_bits_[0] |= 0x00000002u; - return _impl_.asn_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_asn() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.asn) - if (!_internal_has_asn()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000002u; - auto* p = _impl_.asn_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.asn_.IsDefault()) { - _impl_.asn_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_asn(std::string* asn) { - if (asn != nullptr) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.asn_.SetAllocated(asn, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.asn_.IsDefault()) { - _impl_.asn_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.asn) -} - -// optional string org = 4; -inline bool AppGuardIpInfo::_internal_has_org() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_org() const { - return _internal_has_org(); -} -inline void AppGuardIpInfo::clear_org() { - _impl_.org_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline const std::string& AppGuardIpInfo::org() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.org) - return _internal_org(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_org(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.org_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.org) -} -inline std::string* AppGuardIpInfo::mutable_org() { - std::string* _s = _internal_mutable_org(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.org) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_org() const { - return _impl_.org_.Get(); -} -inline void AppGuardIpInfo::_internal_set_org(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.org_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_org() { - _impl_._has_bits_[0] |= 0x00000004u; - return _impl_.org_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_org() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.org) - if (!_internal_has_org()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000004u; - auto* p = _impl_.org_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.org_.IsDefault()) { - _impl_.org_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_org(std::string* org) { - if (org != nullptr) { - _impl_._has_bits_[0] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - _impl_.org_.SetAllocated(org, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.org_.IsDefault()) { - _impl_.org_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.org) -} - -// optional string continent_code = 5; -inline bool AppGuardIpInfo::_internal_has_continent_code() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_continent_code() const { - return _internal_has_continent_code(); -} -inline void AppGuardIpInfo::clear_continent_code() { - _impl_.continent_code_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline const std::string& AppGuardIpInfo::continent_code() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.continent_code) - return _internal_continent_code(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_continent_code(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.continent_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.continent_code) -} -inline std::string* AppGuardIpInfo::mutable_continent_code() { - std::string* _s = _internal_mutable_continent_code(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.continent_code) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_continent_code() const { - return _impl_.continent_code_.Get(); -} -inline void AppGuardIpInfo::_internal_set_continent_code(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.continent_code_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_continent_code() { - _impl_._has_bits_[0] |= 0x00000008u; - return _impl_.continent_code_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_continent_code() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.continent_code) - if (!_internal_has_continent_code()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000008u; - auto* p = _impl_.continent_code_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.continent_code_.IsDefault()) { - _impl_.continent_code_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_continent_code(std::string* continent_code) { - if (continent_code != nullptr) { - _impl_._has_bits_[0] |= 0x00000008u; - } else { - _impl_._has_bits_[0] &= ~0x00000008u; - } - _impl_.continent_code_.SetAllocated(continent_code, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.continent_code_.IsDefault()) { - _impl_.continent_code_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.continent_code) -} - -// optional string city = 6; -inline bool AppGuardIpInfo::_internal_has_city() const { - bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_city() const { - return _internal_has_city(); -} -inline void AppGuardIpInfo::clear_city() { - _impl_.city_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000010u; -} -inline const std::string& AppGuardIpInfo::city() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.city) - return _internal_city(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_city(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.city_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.city) -} -inline std::string* AppGuardIpInfo::mutable_city() { - std::string* _s = _internal_mutable_city(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.city) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_city() const { - return _impl_.city_.Get(); -} -inline void AppGuardIpInfo::_internal_set_city(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000010u; - _impl_.city_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_city() { - _impl_._has_bits_[0] |= 0x00000010u; - return _impl_.city_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_city() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.city) - if (!_internal_has_city()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000010u; - auto* p = _impl_.city_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.city_.IsDefault()) { - _impl_.city_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_city(std::string* city) { - if (city != nullptr) { - _impl_._has_bits_[0] |= 0x00000010u; - } else { - _impl_._has_bits_[0] &= ~0x00000010u; - } - _impl_.city_.SetAllocated(city, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.city_.IsDefault()) { - _impl_.city_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.city) -} - -// optional string region = 7; -inline bool AppGuardIpInfo::_internal_has_region() const { - bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_region() const { - return _internal_has_region(); -} -inline void AppGuardIpInfo::clear_region() { - _impl_.region_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000020u; -} -inline const std::string& AppGuardIpInfo::region() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.region) - return _internal_region(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_region(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000020u; - _impl_.region_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.region) -} -inline std::string* AppGuardIpInfo::mutable_region() { - std::string* _s = _internal_mutable_region(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.region) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_region() const { - return _impl_.region_.Get(); -} -inline void AppGuardIpInfo::_internal_set_region(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000020u; - _impl_.region_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_region() { - _impl_._has_bits_[0] |= 0x00000020u; - return _impl_.region_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_region() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.region) - if (!_internal_has_region()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000020u; - auto* p = _impl_.region_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.region_.IsDefault()) { - _impl_.region_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_region(std::string* region) { - if (region != nullptr) { - _impl_._has_bits_[0] |= 0x00000020u; - } else { - _impl_._has_bits_[0] &= ~0x00000020u; - } - _impl_.region_.SetAllocated(region, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.region_.IsDefault()) { - _impl_.region_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.region) -} - -// optional string postal = 8; -inline bool AppGuardIpInfo::_internal_has_postal() const { - bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_postal() const { - return _internal_has_postal(); -} -inline void AppGuardIpInfo::clear_postal() { - _impl_.postal_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000040u; -} -inline const std::string& AppGuardIpInfo::postal() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.postal) - return _internal_postal(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_postal(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000040u; - _impl_.postal_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.postal) -} -inline std::string* AppGuardIpInfo::mutable_postal() { - std::string* _s = _internal_mutable_postal(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.postal) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_postal() const { - return _impl_.postal_.Get(); -} -inline void AppGuardIpInfo::_internal_set_postal(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000040u; - _impl_.postal_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_postal() { - _impl_._has_bits_[0] |= 0x00000040u; - return _impl_.postal_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_postal() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.postal) - if (!_internal_has_postal()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000040u; - auto* p = _impl_.postal_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.postal_.IsDefault()) { - _impl_.postal_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_postal(std::string* postal) { - if (postal != nullptr) { - _impl_._has_bits_[0] |= 0x00000040u; - } else { - _impl_._has_bits_[0] &= ~0x00000040u; - } - _impl_.postal_.SetAllocated(postal, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.postal_.IsDefault()) { - _impl_.postal_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.postal) -} - -// optional string timezone = 9; -inline bool AppGuardIpInfo::_internal_has_timezone() const { - bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; - return value; -} -inline bool AppGuardIpInfo::has_timezone() const { - return _internal_has_timezone(); -} -inline void AppGuardIpInfo::clear_timezone() { - _impl_.timezone_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000080u; -} -inline const std::string& AppGuardIpInfo::timezone() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.timezone) - return _internal_timezone(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardIpInfo::set_timezone(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000080u; - _impl_.timezone_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.timezone) -} -inline std::string* AppGuardIpInfo::mutable_timezone() { - std::string* _s = _internal_mutable_timezone(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.timezone) - return _s; -} -inline const std::string& AppGuardIpInfo::_internal_timezone() const { - return _impl_.timezone_.Get(); -} -inline void AppGuardIpInfo::_internal_set_timezone(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000080u; - _impl_.timezone_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::_internal_mutable_timezone() { - _impl_._has_bits_[0] |= 0x00000080u; - return _impl_.timezone_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardIpInfo::release_timezone() { - // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.timezone) - if (!_internal_has_timezone()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000080u; - auto* p = _impl_.timezone_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.timezone_.IsDefault()) { - _impl_.timezone_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardIpInfo::set_allocated_timezone(std::string* timezone) { - if (timezone != nullptr) { - _impl_._has_bits_[0] |= 0x00000080u; - } else { - _impl_._has_bits_[0] &= ~0x00000080u; - } - _impl_.timezone_.SetAllocated(timezone, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.timezone_.IsDefault()) { - _impl_.timezone_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.timezone) -} - -// bool blacklist = 100; -inline void AppGuardIpInfo::clear_blacklist() { - _impl_.blacklist_ = false; -} -inline bool AppGuardIpInfo::_internal_blacklist() const { - return _impl_.blacklist_; -} -inline bool AppGuardIpInfo::blacklist() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.blacklist) - return _internal_blacklist(); -} -inline void AppGuardIpInfo::_internal_set_blacklist(bool value) { - - _impl_.blacklist_ = value; -} -inline void AppGuardIpInfo::set_blacklist(bool value) { - _internal_set_blacklist(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.blacklist) -} - -// ------------------------------------------------------------------- - -// AppGuardTcpInfo - -// .appguard.AppGuardTcpConnection connection = 1; -inline bool AppGuardTcpInfo::_internal_has_connection() const { - return this != internal_default_instance() && _impl_.connection_ != nullptr; -} -inline bool AppGuardTcpInfo::has_connection() const { - return _internal_has_connection(); -} -inline void AppGuardTcpInfo::clear_connection() { - if (GetArenaForAllocation() == nullptr && _impl_.connection_ != nullptr) { - delete _impl_.connection_; - } - _impl_.connection_ = nullptr; -} -inline const ::appguard::AppGuardTcpConnection& AppGuardTcpInfo::_internal_connection() const { - const ::appguard::AppGuardTcpConnection* p = _impl_.connection_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpConnection_default_instance_); -} -inline const ::appguard::AppGuardTcpConnection& AppGuardTcpInfo::connection() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.connection) - return _internal_connection(); -} -inline void AppGuardTcpInfo::unsafe_arena_set_allocated_connection( - ::appguard::AppGuardTcpConnection* connection) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.connection_); - } - _impl_.connection_ = connection; - if (connection) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpInfo.connection) -} -inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::release_connection() { - - ::appguard::AppGuardTcpConnection* temp = _impl_.connection_; - _impl_.connection_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::unsafe_arena_release_connection() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpInfo.connection) - - ::appguard::AppGuardTcpConnection* temp = _impl_.connection_; - _impl_.connection_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::_internal_mutable_connection() { - - if (_impl_.connection_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpConnection>(GetArenaForAllocation()); - _impl_.connection_ = p; - } - return _impl_.connection_; -} -inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::mutable_connection() { - ::appguard::AppGuardTcpConnection* _msg = _internal_mutable_connection(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpInfo.connection) - return _msg; -} -inline void AppGuardTcpInfo::set_allocated_connection(::appguard::AppGuardTcpConnection* connection) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.connection_; - } - if (connection) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(connection); - if (message_arena != submessage_arena) { - connection = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, connection, submessage_arena); - } - - } else { - - } - _impl_.connection_ = connection; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpInfo.connection) -} - -// .appguard.AppGuardIpInfo ip_info = 2; -inline bool AppGuardTcpInfo::_internal_has_ip_info() const { - return this != internal_default_instance() && _impl_.ip_info_ != nullptr; -} -inline bool AppGuardTcpInfo::has_ip_info() const { - return _internal_has_ip_info(); -} -inline void AppGuardTcpInfo::clear_ip_info() { - if (GetArenaForAllocation() == nullptr && _impl_.ip_info_ != nullptr) { - delete _impl_.ip_info_; - } - _impl_.ip_info_ = nullptr; -} -inline const ::appguard::AppGuardIpInfo& AppGuardTcpInfo::_internal_ip_info() const { - const ::appguard::AppGuardIpInfo* p = _impl_.ip_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardIpInfo_default_instance_); -} -inline const ::appguard::AppGuardIpInfo& AppGuardTcpInfo::ip_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.ip_info) - return _internal_ip_info(); -} -inline void AppGuardTcpInfo::unsafe_arena_set_allocated_ip_info( - ::appguard::AppGuardIpInfo* ip_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.ip_info_); - } - _impl_.ip_info_ = ip_info; - if (ip_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpInfo.ip_info) -} -inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::release_ip_info() { - - ::appguard::AppGuardIpInfo* temp = _impl_.ip_info_; - _impl_.ip_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::unsafe_arena_release_ip_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpInfo.ip_info) - - ::appguard::AppGuardIpInfo* temp = _impl_.ip_info_; - _impl_.ip_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::_internal_mutable_ip_info() { - - if (_impl_.ip_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardIpInfo>(GetArenaForAllocation()); - _impl_.ip_info_ = p; - } - return _impl_.ip_info_; -} -inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::mutable_ip_info() { - ::appguard::AppGuardIpInfo* _msg = _internal_mutable_ip_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpInfo.ip_info) - return _msg; -} -inline void AppGuardTcpInfo::set_allocated_ip_info(::appguard::AppGuardIpInfo* ip_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.ip_info_; - } - if (ip_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(ip_info); - if (message_arena != submessage_arena) { - ip_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, ip_info, submessage_arena); - } - - } else { - - } - _impl_.ip_info_ = ip_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpInfo.ip_info) -} - -// uint64 tcp_id = 3; -inline void AppGuardTcpInfo::clear_tcp_id() { - _impl_.tcp_id_ = uint64_t{0u}; -} -inline uint64_t AppGuardTcpInfo::_internal_tcp_id() const { - return _impl_.tcp_id_; -} -inline uint64_t AppGuardTcpInfo::tcp_id() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.tcp_id) - return _internal_tcp_id(); -} -inline void AppGuardTcpInfo::_internal_set_tcp_id(uint64_t value) { - - _impl_.tcp_id_ = value; -} -inline void AppGuardTcpInfo::set_tcp_id(uint64_t value) { - _internal_set_tcp_id(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardTcpInfo.tcp_id) -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// AppGuardHttpRequest - -// string token = 1; -inline void AppGuardHttpRequest::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& AppGuardHttpRequest::token() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardHttpRequest::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.token) -} -inline std::string* AppGuardHttpRequest::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.token) - return _s; -} -inline const std::string& AppGuardHttpRequest::_internal_token() const { - return _impl_.token_.Get(); -} -inline void AppGuardHttpRequest::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::release_token() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.token) - return _impl_.token_.Release(); -} -inline void AppGuardHttpRequest::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.token) -} - -// string original_url = 2; -inline void AppGuardHttpRequest::clear_original_url() { - _impl_.original_url_.ClearToEmpty(); -} -inline const std::string& AppGuardHttpRequest::original_url() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.original_url) - return _internal_original_url(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardHttpRequest::set_original_url(ArgT0&& arg0, ArgT... args) { - - _impl_.original_url_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.original_url) -} -inline std::string* AppGuardHttpRequest::mutable_original_url() { - std::string* _s = _internal_mutable_original_url(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.original_url) - return _s; -} -inline const std::string& AppGuardHttpRequest::_internal_original_url() const { - return _impl_.original_url_.Get(); -} -inline void AppGuardHttpRequest::_internal_set_original_url(const std::string& value) { - - _impl_.original_url_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::_internal_mutable_original_url() { - - return _impl_.original_url_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::release_original_url() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.original_url) - return _impl_.original_url_.Release(); -} -inline void AppGuardHttpRequest::set_allocated_original_url(std::string* original_url) { - if (original_url != nullptr) { - - } else { - - } - _impl_.original_url_.SetAllocated(original_url, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.original_url_.IsDefault()) { - _impl_.original_url_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.original_url) -} - -// map headers = 3; -inline int AppGuardHttpRequest::_internal_headers_size() const { - return _impl_.headers_.size(); -} -inline int AppGuardHttpRequest::headers_size() const { - return _internal_headers_size(); -} -inline void AppGuardHttpRequest::clear_headers() { - _impl_.headers_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpRequest::_internal_headers() const { - return _impl_.headers_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpRequest::headers() const { - // @@protoc_insertion_point(field_map:appguard.AppGuardHttpRequest.headers) - return _internal_headers(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpRequest::_internal_mutable_headers() { - return _impl_.headers_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpRequest::mutable_headers() { - // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpRequest.headers) - return _internal_mutable_headers(); -} - -// string method = 4; -inline void AppGuardHttpRequest::clear_method() { - _impl_.method_.ClearToEmpty(); -} -inline const std::string& AppGuardHttpRequest::method() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.method) - return _internal_method(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardHttpRequest::set_method(ArgT0&& arg0, ArgT... args) { - - _impl_.method_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.method) -} -inline std::string* AppGuardHttpRequest::mutable_method() { - std::string* _s = _internal_mutable_method(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.method) - return _s; -} -inline const std::string& AppGuardHttpRequest::_internal_method() const { - return _impl_.method_.Get(); -} -inline void AppGuardHttpRequest::_internal_set_method(const std::string& value) { - - _impl_.method_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::_internal_mutable_method() { - - return _impl_.method_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::release_method() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.method) - return _impl_.method_.Release(); -} -inline void AppGuardHttpRequest::set_allocated_method(std::string* method) { - if (method != nullptr) { - - } else { - - } - _impl_.method_.SetAllocated(method, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.method_.IsDefault()) { - _impl_.method_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.method) -} - -// optional string body = 5; -inline bool AppGuardHttpRequest::_internal_has_body() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppGuardHttpRequest::has_body() const { - return _internal_has_body(); -} -inline void AppGuardHttpRequest::clear_body() { - _impl_.body_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& AppGuardHttpRequest::body() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.body) - return _internal_body(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardHttpRequest::set_body(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.body_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.body) -} -inline std::string* AppGuardHttpRequest::mutable_body() { - std::string* _s = _internal_mutable_body(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.body) - return _s; -} -inline const std::string& AppGuardHttpRequest::_internal_body() const { - return _impl_.body_.Get(); -} -inline void AppGuardHttpRequest::_internal_set_body(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.body_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::_internal_mutable_body() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.body_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardHttpRequest::release_body() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.body) - if (!_internal_has_body()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.body_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.body_.IsDefault()) { - _impl_.body_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardHttpRequest::set_allocated_body(std::string* body) { - if (body != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.body_.SetAllocated(body, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.body_.IsDefault()) { - _impl_.body_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.body) -} - -// map query = 6; -inline int AppGuardHttpRequest::_internal_query_size() const { - return _impl_.query_.size(); -} -inline int AppGuardHttpRequest::query_size() const { - return _internal_query_size(); -} -inline void AppGuardHttpRequest::clear_query() { - _impl_.query_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpRequest::_internal_query() const { - return _impl_.query_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpRequest::query() const { - // @@protoc_insertion_point(field_map:appguard.AppGuardHttpRequest.query) - return _internal_query(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpRequest::_internal_mutable_query() { - return _impl_.query_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpRequest::mutable_query() { - // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpRequest.query) - return _internal_mutable_query(); -} - -// .appguard.AppGuardTcpInfo tcp_info = 100; -inline bool AppGuardHttpRequest::_internal_has_tcp_info() const { - return this != internal_default_instance() && _impl_.tcp_info_ != nullptr; -} -inline bool AppGuardHttpRequest::has_tcp_info() const { - return _internal_has_tcp_info(); -} -inline void AppGuardHttpRequest::clear_tcp_info() { - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; -} -inline const ::appguard::AppGuardTcpInfo& AppGuardHttpRequest::_internal_tcp_info() const { - const ::appguard::AppGuardTcpInfo* p = _impl_.tcp_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpInfo_default_instance_); -} -inline const ::appguard::AppGuardTcpInfo& AppGuardHttpRequest::tcp_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.tcp_info) - return _internal_tcp_info(); -} -inline void AppGuardHttpRequest::unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tcp_info_); - } - _impl_.tcp_info_ = tcp_info; - if (tcp_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.tcp_info) -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::release_tcp_info() { - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::unsafe_arena_release_tcp_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.tcp_info) - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::_internal_mutable_tcp_info() { - - if (_impl_.tcp_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArenaForAllocation()); - _impl_.tcp_info_ = p; - } - return _impl_.tcp_info_; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::mutable_tcp_info() { - ::appguard::AppGuardTcpInfo* _msg = _internal_mutable_tcp_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.tcp_info) - return _msg; -} -inline void AppGuardHttpRequest::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.tcp_info_; - } - if (tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tcp_info); - if (message_arena != submessage_arena) { - tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, tcp_info, submessage_arena); - } - - } else { - - } - _impl_.tcp_info_ = tcp_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.tcp_info) -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// AppGuardHttpResponse - -// string token = 1; -inline void AppGuardHttpResponse::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& AppGuardHttpResponse::token() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardHttpResponse::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpResponse.token) -} -inline std::string* AppGuardHttpResponse::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpResponse.token) - return _s; -} -inline const std::string& AppGuardHttpResponse::_internal_token() const { - return _impl_.token_.Get(); -} -inline void AppGuardHttpResponse::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardHttpResponse::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardHttpResponse::release_token() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpResponse.token) - return _impl_.token_.Release(); -} -inline void AppGuardHttpResponse::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpResponse.token) -} - -// uint32 code = 2; -inline void AppGuardHttpResponse::clear_code() { - _impl_.code_ = 0u; -} -inline uint32_t AppGuardHttpResponse::_internal_code() const { - return _impl_.code_; -} -inline uint32_t AppGuardHttpResponse::code() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.code) - return _internal_code(); -} -inline void AppGuardHttpResponse::_internal_set_code(uint32_t value) { - - _impl_.code_ = value; -} -inline void AppGuardHttpResponse::set_code(uint32_t value) { - _internal_set_code(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardHttpResponse.code) -} - -// map headers = 3; -inline int AppGuardHttpResponse::_internal_headers_size() const { - return _impl_.headers_.size(); -} -inline int AppGuardHttpResponse::headers_size() const { - return _internal_headers_size(); -} -inline void AppGuardHttpResponse::clear_headers() { - _impl_.headers_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpResponse::_internal_headers() const { - return _impl_.headers_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardHttpResponse::headers() const { - // @@protoc_insertion_point(field_map:appguard.AppGuardHttpResponse.headers) - return _internal_headers(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpResponse::_internal_mutable_headers() { - return _impl_.headers_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardHttpResponse::mutable_headers() { - // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpResponse.headers) - return _internal_mutable_headers(); -} - -// .appguard.AppGuardTcpInfo tcp_info = 100; -inline bool AppGuardHttpResponse::_internal_has_tcp_info() const { - return this != internal_default_instance() && _impl_.tcp_info_ != nullptr; -} -inline bool AppGuardHttpResponse::has_tcp_info() const { - return _internal_has_tcp_info(); -} -inline void AppGuardHttpResponse::clear_tcp_info() { - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; -} -inline const ::appguard::AppGuardTcpInfo& AppGuardHttpResponse::_internal_tcp_info() const { - const ::appguard::AppGuardTcpInfo* p = _impl_.tcp_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpInfo_default_instance_); -} -inline const ::appguard::AppGuardTcpInfo& AppGuardHttpResponse::tcp_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.tcp_info) - return _internal_tcp_info(); -} -inline void AppGuardHttpResponse::unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tcp_info_); - } - _impl_.tcp_info_ = tcp_info; - if (tcp_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpResponse.tcp_info) -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::release_tcp_info() { - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::unsafe_arena_release_tcp_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardHttpResponse.tcp_info) - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::_internal_mutable_tcp_info() { - - if (_impl_.tcp_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArenaForAllocation()); - _impl_.tcp_info_ = p; - } - return _impl_.tcp_info_; -} -inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::mutable_tcp_info() { - ::appguard::AppGuardTcpInfo* _msg = _internal_mutable_tcp_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpResponse.tcp_info) - return _msg; -} -inline void AppGuardHttpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.tcp_info_; - } - if (tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tcp_info); - if (message_arena != submessage_arena) { - tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, tcp_info, submessage_arena); - } - - } else { - - } - _impl_.tcp_info_ = tcp_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpResponse.tcp_info) -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// AppGuardSmtpRequest - -// string token = 1; -inline void AppGuardSmtpRequest::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& AppGuardSmtpRequest::token() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardSmtpRequest::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpRequest.token) -} -inline std::string* AppGuardSmtpRequest::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.token) - return _s; -} -inline const std::string& AppGuardSmtpRequest::_internal_token() const { - return _impl_.token_.Get(); -} -inline void AppGuardSmtpRequest::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpRequest::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpRequest::release_token() { - // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.token) - return _impl_.token_.Release(); -} -inline void AppGuardSmtpRequest::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.token) -} - -// map headers = 2; -inline int AppGuardSmtpRequest::_internal_headers_size() const { - return _impl_.headers_.size(); -} -inline int AppGuardSmtpRequest::headers_size() const { - return _internal_headers_size(); -} -inline void AppGuardSmtpRequest::clear_headers() { - _impl_.headers_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardSmtpRequest::_internal_headers() const { - return _impl_.headers_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AppGuardSmtpRequest::headers() const { - // @@protoc_insertion_point(field_map:appguard.AppGuardSmtpRequest.headers) - return _internal_headers(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardSmtpRequest::_internal_mutable_headers() { - return _impl_.headers_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AppGuardSmtpRequest::mutable_headers() { - // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardSmtpRequest.headers) - return _internal_mutable_headers(); -} - -// optional string body = 3; -inline bool AppGuardSmtpRequest::_internal_has_body() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppGuardSmtpRequest::has_body() const { - return _internal_has_body(); -} -inline void AppGuardSmtpRequest::clear_body() { - _impl_.body_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const std::string& AppGuardSmtpRequest::body() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.body) - return _internal_body(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardSmtpRequest::set_body(ArgT0&& arg0, ArgT... args) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.body_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpRequest.body) -} -inline std::string* AppGuardSmtpRequest::mutable_body() { - std::string* _s = _internal_mutable_body(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.body) - return _s; -} -inline const std::string& AppGuardSmtpRequest::_internal_body() const { - return _impl_.body_.Get(); -} -inline void AppGuardSmtpRequest::_internal_set_body(const std::string& value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.body_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpRequest::_internal_mutable_body() { - _impl_._has_bits_[0] |= 0x00000001u; - return _impl_.body_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpRequest::release_body() { - // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.body) - if (!_internal_has_body()) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001u; - auto* p = _impl_.body_.Release(); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.body_.IsDefault()) { - _impl_.body_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void AppGuardSmtpRequest::set_allocated_body(std::string* body) { - if (body != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.body_.SetAllocated(body, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.body_.IsDefault()) { - _impl_.body_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.body) -} - -// .appguard.AppGuardTcpInfo tcp_info = 100; -inline bool AppGuardSmtpRequest::_internal_has_tcp_info() const { - return this != internal_default_instance() && _impl_.tcp_info_ != nullptr; -} -inline bool AppGuardSmtpRequest::has_tcp_info() const { - return _internal_has_tcp_info(); -} -inline void AppGuardSmtpRequest::clear_tcp_info() { - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; -} -inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpRequest::_internal_tcp_info() const { - const ::appguard::AppGuardTcpInfo* p = _impl_.tcp_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpInfo_default_instance_); -} -inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpRequest::tcp_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.tcp_info) - return _internal_tcp_info(); -} -inline void AppGuardSmtpRequest::unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tcp_info_); - } - _impl_.tcp_info_ = tcp_info; - if (tcp_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpRequest.tcp_info) -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::release_tcp_info() { - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::unsafe_arena_release_tcp_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.tcp_info) - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::_internal_mutable_tcp_info() { - - if (_impl_.tcp_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArenaForAllocation()); - _impl_.tcp_info_ = p; - } - return _impl_.tcp_info_; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::mutable_tcp_info() { - ::appguard::AppGuardTcpInfo* _msg = _internal_mutable_tcp_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.tcp_info) - return _msg; -} -inline void AppGuardSmtpRequest::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.tcp_info_; - } - if (tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tcp_info); - if (message_arena != submessage_arena) { - tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, tcp_info, submessage_arena); - } - - } else { - - } - _impl_.tcp_info_ = tcp_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.tcp_info) -} - -// ------------------------------------------------------------------- - -// AppGuardSmtpResponse - -// string token = 1; -inline void AppGuardSmtpResponse::clear_token() { - _impl_.token_.ClearToEmpty(); -} -inline const std::string& AppGuardSmtpResponse::token() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.token) - return _internal_token(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void AppGuardSmtpResponse::set_token(ArgT0&& arg0, ArgT... args) { - - _impl_.token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpResponse.token) -} -inline std::string* AppGuardSmtpResponse::mutable_token() { - std::string* _s = _internal_mutable_token(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpResponse.token) - return _s; -} -inline const std::string& AppGuardSmtpResponse::_internal_token() const { - return _impl_.token_.Get(); -} -inline void AppGuardSmtpResponse::_internal_set_token(const std::string& value) { - - _impl_.token_.Set(value, GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpResponse::_internal_mutable_token() { - - return _impl_.token_.Mutable(GetArenaForAllocation()); -} -inline std::string* AppGuardSmtpResponse::release_token() { - // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpResponse.token) - return _impl_.token_.Release(); -} -inline void AppGuardSmtpResponse::set_allocated_token(std::string* token) { - if (token != nullptr) { - - } else { - - } - _impl_.token_.SetAllocated(token, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.token_.IsDefault()) { - _impl_.token_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpResponse.token) -} - -// optional uint32 code = 2; -inline bool AppGuardSmtpResponse::_internal_has_code() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool AppGuardSmtpResponse::has_code() const { - return _internal_has_code(); -} -inline void AppGuardSmtpResponse::clear_code() { - _impl_.code_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline uint32_t AppGuardSmtpResponse::_internal_code() const { - return _impl_.code_; -} -inline uint32_t AppGuardSmtpResponse::code() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.code) - return _internal_code(); -} -inline void AppGuardSmtpResponse::_internal_set_code(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.code_ = value; -} -inline void AppGuardSmtpResponse::set_code(uint32_t value) { - _internal_set_code(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpResponse.code) -} - -// .appguard.AppGuardTcpInfo tcp_info = 100; -inline bool AppGuardSmtpResponse::_internal_has_tcp_info() const { - return this != internal_default_instance() && _impl_.tcp_info_ != nullptr; -} -inline bool AppGuardSmtpResponse::has_tcp_info() const { - return _internal_has_tcp_info(); -} -inline void AppGuardSmtpResponse::clear_tcp_info() { - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; -} -inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpResponse::_internal_tcp_info() const { - const ::appguard::AppGuardTcpInfo* p = _impl_.tcp_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpInfo_default_instance_); -} -inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpResponse::tcp_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.tcp_info) - return _internal_tcp_info(); -} -inline void AppGuardSmtpResponse::unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tcp_info_); - } - _impl_.tcp_info_ = tcp_info; - if (tcp_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpResponse.tcp_info) -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::release_tcp_info() { - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::unsafe_arena_release_tcp_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpResponse.tcp_info) - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::_internal_mutable_tcp_info() { - - if (_impl_.tcp_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArenaForAllocation()); - _impl_.tcp_info_ = p; - } - return _impl_.tcp_info_; -} -inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::mutable_tcp_info() { - ::appguard::AppGuardTcpInfo* _msg = _internal_mutable_tcp_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpResponse.tcp_info) - return _msg; -} -inline void AppGuardSmtpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.tcp_info_; - } - if (tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tcp_info); - if (message_arena != submessage_arena) { - tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, tcp_info, submessage_arena); - } - - } else { - - } - _impl_.tcp_info_ = tcp_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpResponse.tcp_info) -} - -// ------------------------------------------------------------------- - -// AppGuardResponse - -// .appguard.FirewallPolicy policy = 2; -inline void AppGuardResponse::clear_policy() { - _impl_.policy_ = 0; -} -inline ::appguard::FirewallPolicy AppGuardResponse::_internal_policy() const { - return static_cast< ::appguard::FirewallPolicy >(_impl_.policy_); -} -inline ::appguard::FirewallPolicy AppGuardResponse::policy() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardResponse.policy) - return _internal_policy(); -} -inline void AppGuardResponse::_internal_set_policy(::appguard::FirewallPolicy value) { - - _impl_.policy_ = value; -} -inline void AppGuardResponse::set_policy(::appguard::FirewallPolicy value) { - _internal_set_policy(value); - // @@protoc_insertion_point(field_set:appguard.AppGuardResponse.policy) -} - -// ------------------------------------------------------------------- - -// AppGuardTcpResponse - -// .appguard.AppGuardTcpInfo tcp_info = 1; -inline bool AppGuardTcpResponse::_internal_has_tcp_info() const { - return this != internal_default_instance() && _impl_.tcp_info_ != nullptr; -} -inline bool AppGuardTcpResponse::has_tcp_info() const { - return _internal_has_tcp_info(); -} -inline void AppGuardTcpResponse::clear_tcp_info() { - if (GetArenaForAllocation() == nullptr && _impl_.tcp_info_ != nullptr) { - delete _impl_.tcp_info_; - } - _impl_.tcp_info_ = nullptr; -} -inline const ::appguard::AppGuardTcpInfo& AppGuardTcpResponse::_internal_tcp_info() const { - const ::appguard::AppGuardTcpInfo* p = _impl_.tcp_info_; - return p != nullptr ? *p : reinterpret_cast( - ::appguard::_AppGuardTcpInfo_default_instance_); -} -inline const ::appguard::AppGuardTcpInfo& AppGuardTcpResponse::tcp_info() const { - // @@protoc_insertion_point(field_get:appguard.AppGuardTcpResponse.tcp_info) - return _internal_tcp_info(); -} -inline void AppGuardTcpResponse::unsafe_arena_set_allocated_tcp_info( - ::appguard::AppGuardTcpInfo* tcp_info) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tcp_info_); - } - _impl_.tcp_info_ = tcp_info; - if (tcp_info) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpResponse.tcp_info) -} -inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::release_tcp_info() { - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::unsafe_arena_release_tcp_info() { - // @@protoc_insertion_point(field_release:appguard.AppGuardTcpResponse.tcp_info) - - ::appguard::AppGuardTcpInfo* temp = _impl_.tcp_info_; - _impl_.tcp_info_ = nullptr; - return temp; -} -inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::_internal_mutable_tcp_info() { - - if (_impl_.tcp_info_ == nullptr) { - auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArenaForAllocation()); - _impl_.tcp_info_ = p; - } - return _impl_.tcp_info_; -} -inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::mutable_tcp_info() { - ::appguard::AppGuardTcpInfo* _msg = _internal_mutable_tcp_info(); - // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpResponse.tcp_info) - return _msg; -} -inline void AppGuardTcpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.tcp_info_; - } - if (tcp_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tcp_info); - if (message_arena != submessage_arena) { - tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, tcp_info, submessage_arena); - } - - } else { - - } - _impl_.tcp_info_ = tcp_info; - // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpResponse.tcp_info) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace appguard - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::appguard::DeviceStatus> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::appguard::DeviceStatus>() { - return ::appguard::DeviceStatus_descriptor(); -} -template <> struct is_proto_enum< ::appguard::FirewallPolicy> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::appguard::FirewallPolicy>() { - return ::appguard::FirewallPolicy_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto diff --git a/src/appguard.storage.cpp b/src/appguard.storage.cpp new file mode 100644 index 0000000..46c0bea --- /dev/null +++ b/src/appguard.storage.cpp @@ -0,0 +1,40 @@ +#include "appguard.storage.hpp" +#include "appguard.uclient.exception.hpp" + +Storage &Storage::GetInstance() +{ + static Storage instance; + return instance; +} + +void Storage::Initialize() +{ + static std::once_flag initialized; + std::call_once(initialized, [&]() + { GetInstance(); }); +} + +void Storage::Set(const std::string &key, const std::string &value) +{ + std::lock_guard lock(this->mutex); + this->data[key] = value; +} + +std::optional Storage::Get(const std::string &key) const +{ + std::lock_guard lock(this->mutex); + if (auto iter = this->data.find(key); iter != this->data.end()) + { + return {iter->second}; + } + else + { + return {}; + } +} + +void Storage::Clear() +{ + std::lock_guard lock(this->mutex); + this->data.clear(); +} \ No newline at end of file diff --git a/src/appguard.storage.hpp b/src/appguard.storage.hpp new file mode 100644 index 0000000..b28e721 --- /dev/null +++ b/src/appguard.storage.hpp @@ -0,0 +1,64 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +/** + * @brief Thread-safe singleton for key-value storage. + */ +class Storage +{ +public: + /** + * @brief Gets the singleton instance. + * @return Reference to the singleton instance. + */ + static Storage &GetInstance(); + /** + * @brief Initializes the singleton with default configuration. + * Should be called before first GetInstance() call. + */ + static void Initialize(); + /** + * @brief Stores a key-value pair and saves to disk. + * @param key The key to store. + * @param value The value to associate with the key. + */ + void Set(const std::string &key, const std::string &value); + /** + * @brief Retrieves a value by key. + * @param key The key to search for. + * @return Optional containing the value if found, nullopt otherwise. + */ + std::optional Get(const std::string &key) const; + + /** + * @brief Removes all data from storage. + */ + void Clear(); + +private: + /** + * @brief Private constructor for singleton pattern. + */ + explicit Storage() = default; + /// Deleted copy constructor for singleton pattern. + Storage(const Storage &) = delete; + /// Deleted copy assignment for singleton pattern. + Storage &operator=(const Storage &) = delete; + /// Deleted move constructor for singleton pattern. + Storage(Storage &&) = delete; + /// Deleted move assignment for singleton pattern. + Storage &operator=(Storage &&) = delete; + /// Default destructor. + ~Storage() = default; + +private: + std::unordered_map data; + mutable std::mutex mutex; +}; diff --git a/src/appguard.stream.cpp b/src/appguard.stream.cpp index 776e6ab..ef1216f 100644 --- a/src/appguard.stream.cpp +++ b/src/appguard.stream.cpp @@ -1,13 +1,128 @@ #include "appguard.stream.hpp" +#include "appguard.inner.utils.hpp" +#include "appguard.storage.hpp" +#include "appguard.uclient.exception.hpp" + +#define CLIENT_CATEGORY "AppGuard Client" +#define CLIENT_TYPE "NGINX" +#define MAKE_APP_ID_STORAGE_KEY(code) "app_id:" + code +#define MAKE_APP_SECRET_STORAGE_KEY(code) "app_secret:" + code + +namespace internal +{ + using CM = appguard_commands::ClientMessage; + using SM = appguard_commands::ServerMessage; + + static bool PerformAuthorization( + const AppGuardStream *stream, + grpc::ClientReaderWriter *rw_stream, + const std::string &installation_code, + const std::string &target_os, + const std::string &uuid) + { + CM request; + + request.mutable_authorization_request()->set_code(installation_code); + request.mutable_authorization_request()->set_type(CLIENT_TYPE); + request.mutable_authorization_request()->set_category(CLIENT_CATEGORY); + request.mutable_authorization_request()->set_target_os(target_os); + request.mutable_authorization_request()->set_uuid(uuid); + + if (!rw_stream->Write(request)) + { + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard: Failed to send authorization request"); + return false; + } + + SM response; + while (stream->Running() && rw_stream->Read(&response)) + { + if (response.has_device_authorized()) + { + const auto &data = response.device_authorized(); + + if (data.has_app_id()) + { + const auto key = MAKE_APP_ID_STORAGE_KEY(installation_code); + Storage::GetInstance().Set(key, data.app_id()); + } + + if (data.has_app_secret()) + { + const auto key = MAKE_APP_SECRET_STORAGE_KEY(installation_code); + Storage::GetInstance().Set(key, data.app_secret()); + } + + return true; + } + + if (response.has_authorization_rejected()) + { + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard Server Rejected Authorization"); + return false; + } + } + + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard Server Authorization failed"); + + return false; + } + + static bool PerformAuthentication( + const AppGuardStream *stream, + grpc::ClientReaderWriter *rw_stream, + const std::string &installation_code) + { + auto app_id = Storage::GetInstance().Get(MAKE_APP_ID_STORAGE_KEY(installation_code)); + auto app_secret = Storage::GetInstance().Get(MAKE_APP_SECRET_STORAGE_KEY(installation_code)); + + if (!app_id.has_value() || !app_secret.has_value()) + { + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard: Failed to obtain credentials."); + + return false; + } + + appguard_commands::ClientMessage authmsg; + authmsg.mutable_authentication()->set_app_id(app_id.value()); + authmsg.mutable_authentication()->set_app_secret(app_secret.value()); + + if (!rw_stream->Write(authmsg)) + { + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard: Failed to send authentication."); + + return false; + } + + return true; + } +} AppGuardStream::AppGuardStream( std::shared_ptr channel, - const std::string &app_id, - const std::string &app_secret) - : app_id(app_id), - app_secret(app_secret), + const std::string &installation_code) + : installation_code(installation_code), token({}), - device_status(appguard::DeviceStatus::DS_UNKNOWN), running(false), channel(channel) { @@ -21,35 +136,71 @@ AppGuardStream::~AppGuardStream() void AppGuardStream::Start() { + + std::string device_uuid = appguard::inner_utils::GetSystemUUID(); + std::string target_os = appguard::inner_utils::GetOsAsString(); + this->running = true; - this->thread = std::thread([this]() - { + this->thread = std::thread( + [this, + uuid = std::move(device_uuid), + os = std::move(target_os)]() + { while (this->running) { - { std::lock_guard lock(this->context_mutex); this->context = std::make_unique(); } - appguard::HeartbeatRequest request; + auto stub = appguard::AppGuard::NewStub(this->channel); + auto rw_stream = stub->ControlChannel(this->context.get()); - request.set_app_id(this->app_id); - request.set_app_secret(this->app_secret); + // Step 1: Send Authorization request and await for the verdict + if (!internal::PerformAuthorization(this, rw_stream.get(), installation_code, os, uuid)) { + this->running = false; + std::lock_guard lock(this->context_mutex); + this->context.reset(); + return; + } - auto stub = appguard::AppGuard::NewStub(this->channel); - auto reader = stub->Heartbeat(this->context.get(), request); + // Step 2: Collect credentials and send authentication + if (!internal::PerformAuthentication(this, rw_stream.get(), installation_code)) { + this->running = false; + std::lock_guard lock(this->context_mutex); + this->context.reset(); + return; + } - appguard::HeartbeatResponse response; - while (this->running && reader->Read(&response)) { - this->SetToken(response.token()); - this->SetDeviceStatus(response.status()); + // Step 3: Accept messages from the server + internal::SM message; + while (this->Running() && rw_stream->Read(&message)) { + if (const auto& token = message.update_token_command(); !token.empty()) + { + this->SetToken(token); + continue; + } + + if (message.has_device_deauthorized()) { + IGNORE_ALL_EXCEPTIONS({ + Storage::GetInstance().Clear(); + }); + + ngx_log_error( + NGX_LOG_ERR, + ngx_cycle->log, + 0, + "AppGuard: Server sent de-authorization"); + + this->running = false; + std::lock_guard lock(this->context_mutex); + this->context.reset(); + return; + } } - auto status = reader->Finish(); + auto status = rw_stream->Finish(); if (!status.ok() && this->running) { this->SetToken(""); - this->SetDeviceStatus(appguard::DeviceStatus::DS_UNKNOWN); - this->running = false; std::chrono::seconds timeout(5); std::this_thread::sleep_for(timeout); @@ -71,7 +222,9 @@ void AppGuardStream::Stop() { std::lock_guard lock(this->context_mutex); if (this->context) + { this->context->TryCancel(); + } } if (this->thread.joinable()) diff --git a/src/appguard.stream.hpp b/src/appguard.stream.hpp index 6339f88..e8a3a5f 100644 --- a/src/appguard.stream.hpp +++ b/src/appguard.stream.hpp @@ -1,8 +1,9 @@ -#ifndef __APPGUARD_STREAM_HPP__ -#define __APPGUARD_STREAM_HPP__ +#pragma once -#include "appguard.pb.h" -#include "appguard.grpc.pb.h" +#include "generated/appguard.pb.h" +#include "generated/appguard.grpc.pb.h" +#include "generated/commands.pb.h" +#include "generated/commands.grpc.pb.h" #include #include @@ -23,13 +24,11 @@ class AppGuardStream /** * @brief Constructs an AppGuardStream and starts the heartbeat stream. * @param channel Shared pointer to the gRPC channel. - * @param app_id Application identifier. - * @param app_secret Application secret key. + * @param installation_code NullNet installation code. */ AppGuardStream( std::shared_ptr channel, - const std::string &app_id, - const std::string &app_secret); + const std::string &installation_code); /** * @brief Destructor that stops the heartbeat stream. @@ -42,42 +41,6 @@ class AppGuardStream */ inline auto Running() const noexcept { return this->running.load(); } - /** - * @brief Checks if the device status is ACTIVE. - * @return True if device status is ACTIVE; otherwise, false. - */ - inline auto IsDeviceStatusActive() const noexcept - { - return this->device_status.load() == appguard::DeviceStatus::ACTIVE; - } - - /** - * @brief Checks if the device status is DRAFT. - * @return True if device status is DRAFT; otherwise, false. - */ - inline auto IsDeviceStatusDraft() const noexcept - { - return this->device_status.load() == appguard::DeviceStatus::DRAFT; - } - - /** - * @brief Checks if the device status is ARCHIVED. - * @return True if device status is ARCHIVED; otherwise, false. - */ - inline auto IsDeviceStatusAchived() const noexcept - { - return this->device_status.load() == appguard::DeviceStatus::ARCHIVED; - } - - /** - * @brief Checks if the device status is UNKNOWN. - * @return True if device status is UNKNOWN; otherwise, false. - */ - inline auto IsDeviceStatusUnknown() const noexcept - { - return this->device_status.load() == appguard::DeviceStatus::DS_UNKNOWN; - } - /** * @brief Waits for the token to become available until the specified timeout duration. * @param timeout The maximum duration to wait for the token. @@ -102,38 +65,23 @@ class AppGuardStream */ void SetToken(const std::string &token); - /** - * @brief Sets the device status atomically. - * @param status The new device status to set. - */ - inline void SetDeviceStatus(appguard::DeviceStatus status) noexcept - { - this->device_status.store(status); - } - private: - // Application identifier. - std::string app_id; - // Application secret key. - std::string app_secret; + // Installation code. + std::string installation_code; // Authentication token received from the server. std::string token; // Mutex to protect access to the token. mutable std::mutex token_mutex; // Condition variable to wait for token availability. std::condition_variable token_cv; - // Current device status. - std::atomic device_status; - // Thread handling the heartbeat stream. + // Thread handling the control channel. std::thread thread; - // Flag indicating if the stream is running. + // Flag indicating if the control channel is running. std::atomic_bool running; // gRPC channel to the server. std::shared_ptr channel; // Mutex to protect access to the gRPC context. std::mutex context_mutex; - // gRPC client context for the stream. + // gRPC client context for the control channel. std::unique_ptr context; }; - -#endif \ No newline at end of file diff --git a/src/appguard.tcp.ucache.hpp b/src/appguard.tcp.ucache.hpp index 7baf63a..3ab20fa 100644 --- a/src/appguard.tcp.ucache.hpp +++ b/src/appguard.tcp.ucache.hpp @@ -1,5 +1,4 @@ -#ifndef __APPGUARD_TCP_UCACHE_HPP__ -#define __APPGUARD_TCP_UCACHE_HPP__ +#pragma once extern "C" { @@ -12,7 +11,7 @@ extern "C" #include #include -#include "appguard.pb.h" +#include "generated/appguard.pb.h" /** * @brief A fixed-size LRU (Least Recently Used) cache for storing AppGuard IP info. @@ -68,5 +67,3 @@ class AppguardTcpInfoCache /// Hash map to quickly access list nodes by key. std::unordered_map map; }; - -#endif \ No newline at end of file diff --git a/src/appguard.uclient.exception.cpp b/src/appguard.uclient.exception.cpp index 1d8a96b..1bbc760 100644 --- a/src/appguard.uclient.exception.cpp +++ b/src/appguard.uclient.exception.cpp @@ -52,6 +52,10 @@ static inline std::string AppGuardStatusCodeToStr(AppGuardStatusCode code) return "APPGUARD_FAILED_TO_SAVE_CLIENT"; case AppGuardStatusCode::APPGUARD_CERTIFICATE_NOT_FOUND: return "APPGUARD_CERTIFICATE_NOT_FOUND"; + case AppGuardStatusCode::APPGUARD_FAILED_TO_OBTAIN_UUID: + return "APPGUARD_FAILED_TO_OBTAIN_UUID"; + case AppGuardStatusCode::APPGUARD_STORAGE_OPERATION_FAILURE: + return "APPGUARD_STORAGE_OPERATION_FAILURE"; default: return "UNKNOWN"; } diff --git a/src/appguard.uclient.exception.hpp b/src/appguard.uclient.exception.hpp index 4dbca9b..dfc485f 100644 --- a/src/appguard.uclient.exception.hpp +++ b/src/appguard.uclient.exception.hpp @@ -1,5 +1,4 @@ -#ifndef __APPGUARD_UCLIENT_EXCEPTION_HPP__ -#define __APPGUARD_UCLIENT_EXCEPTION_HPP__ +#pragma once #include #include @@ -20,6 +19,10 @@ enum class AppGuardStatusCode APPGUARD_CONNECTION_TIMEOUT, // Failed to load the server's certificate APPGUARD_CERTIFICATE_NOT_FOUND, + // Failed to obtain device UUID + APPGUARD_FAILED_TO_OBTAIN_UUID, + // Storage operation error + APPGUARD_STORAGE_OPERATION_FAILURE }; /** @@ -80,4 +83,18 @@ class AppGuardClientException : public std::runtime_error } \ } while (0) -#endif \ No newline at end of file +/** + * @brief Executes a statement while silently ignoring any thrown exceptions + * @param statement The statement or expression to execute + */ +#define IGNORE_ALL_EXCEPTIONS(statement) \ + do \ + { \ + try \ + { \ + (statement); \ + } \ + catch (...) \ + { \ + } \ + } while (0) diff --git a/src/appguard.uclient.info.cpp b/src/appguard.uclient.info.cpp index 81b6966..e5f70be 100644 --- a/src/appguard.uclient.info.cpp +++ b/src/appguard.uclient.info.cpp @@ -4,12 +4,12 @@ bool AppGaurdClientInfo::operator==(const AppGaurdClientInfo &other) const { - return std::tie(this->app_id, this->app_secret, this->server_addr, this->tls) == - std::tie(other.app_id, other.app_secret, other.server_addr, other.tls); + return std::tie(this->installation_code, this->server_addr, this->tls) == + std::tie(other.installation_code, other.server_addr, other.tls); } bool AppGaurdClientInfo::operator<(const AppGaurdClientInfo &other) const { - return std::tie(this->app_id, this->app_secret, this->server_addr, this->tls) < - std::tie(other.app_id, other.app_secret, other.server_addr, other.tls); + return std::tie(this->installation_code, this->server_addr, this->tls) < + std::tie(other.installation_code, other.server_addr, other.tls); } \ No newline at end of file diff --git a/src/appguard.uclient.info.hpp b/src/appguard.uclient.info.hpp index c4e1c9f..9716fa6 100644 --- a/src/appguard.uclient.info.hpp +++ b/src/appguard.uclient.info.hpp @@ -1,5 +1,4 @@ -#ifndef __APPGUARD_UCLIENT_INFO_HPP__ -#define __APPGUARD_UCLIENT_INFO_HPP__ +#pragma once #include @@ -8,10 +7,8 @@ */ struct AppGaurdClientInfo { - // Unique identifier for the application. - std::string app_id; - // Secret key used for authenticating the application. - std::string app_secret; + // NullNet Installation Code + std::string installation_code; // Address of the AppGuard server (e.g., "localhost:50051"). std::string server_addr; // Path to server's certificate file. @@ -59,5 +56,3 @@ struct AppGaurdClientInfo */ bool operator<(const AppGaurdClientInfo &other) const; }; - -#endif \ No newline at end of file diff --git a/src/appguard.wrapper.cpp b/src/appguard.wrapper.cpp index d030877..064fc08 100644 --- a/src/appguard.wrapper.cpp +++ b/src/appguard.wrapper.cpp @@ -35,11 +35,8 @@ static inline std::shared_ptr OpenChannel(const std::string &addr } } -AppGuardWrapper::AppGuardWrapper( - std::shared_ptr channel, - const std::string &app_id, - const std::string &app_secret) - : channel(channel), stream(new AppGuardStream(channel, app_id, app_secret)) +AppGuardWrapper::AppGuardWrapper(std::shared_ptr channel, const std::string &installation_code) + : channel(channel), stream(new AppGuardStream(channel, installation_code)) { } @@ -57,7 +54,7 @@ AppGuardWrapper AppGuardWrapper::CreateClient(AppGaurdClientInfo client_info, co THROW_IF_CUSTOM(!channel->WaitForConnected(deadline_time), AppGuardStatusCode::APPGUARD_CONNECTION_TIMEOUT); - auto client = AppGuardWrapper(channel, client_info.app_id, client_info.app_secret); + auto client = AppGuardWrapper(channel, client_info.installation_code); const auto [_, success] = clients.emplace(client_info, client); THROW_IF_CUSTOM(!success, AppGuardStatusCode::APPGUARD_FAILED_TO_SAVE_CLIENT); @@ -68,8 +65,6 @@ AppGuardWrapper AppGuardWrapper::CreateClient(AppGaurdClientInfo client_info, co appguard::AppGuardTcpResponse AppGuardWrapper::HandleTcpConnection(appguard::AppGuardTcpConnection connection) { - this->ValidateStatus(); - auto token = this->AcquireToken(); connection.set_token(token); @@ -87,8 +82,6 @@ AppGuardWrapper::HandleTcpConnection(appguard::AppGuardTcpConnection connection) appguard::AppGuardResponse AppGuardWrapper::HandleHttpRequest(appguard::AppGuardHttpRequest request) { - this->ValidateStatus(); - auto token = this->AcquireToken(); request.set_token(token); @@ -106,8 +99,6 @@ AppGuardWrapper::HandleHttpRequest(appguard::AppGuardHttpRequest request) appguard::AppGuardResponse AppGuardWrapper::HandleHttpResponse(appguard::AppGuardHttpResponse request) { - this->ValidateStatus(); - auto token = this->AcquireToken(); request.set_token(token); @@ -122,18 +113,6 @@ AppGuardWrapper::HandleHttpResponse(appguard::AppGuardHttpResponse request) return response; } -void AppGuardWrapper::ValidateStatus() const -{ - // @TODO: - // Probably allow only ACTIVE devices - - // if (!this->stream->IsDeviceStatusActive()) - // throw AppGuardClientException( - // grpc::StatusCode::ABORTED, - // "Aborting gRPC request, since device is not active." - // ); -} - std::string AppGuardWrapper::AcquireToken() const { THROW_IF_CUSTOM(!this->stream->Running(), AppGuardStatusCode::APPGUARD_AUTH_STREAM_NOT_RUNNING); diff --git a/src/appguard.wrapper.hpp b/src/appguard.wrapper.hpp index a812246..d18ca41 100644 --- a/src/appguard.wrapper.hpp +++ b/src/appguard.wrapper.hpp @@ -1,8 +1,7 @@ -#ifndef __APPGUARD_CLIENT_HPP__ -#define __APPGUARD_CLIENT_HPP__ +#pragma once -#include "appguard.pb.h" -#include "appguard.grpc.pb.h" +#include "generated/appguard.pb.h" +#include "generated/appguard.grpc.pb.h" #include "appguard.uclient.info.hpp" #include "appguard.stream.hpp" @@ -73,17 +72,9 @@ class AppGuardWrapper * @brief Private constructor used by CreateClient to initialize the wrapper. * * @param channel The gRPC channel to communicate with the AppGuard service. - * @param app_id The application ID for authentication. - * @param app_secret The application secret for authentication. + * @param installation_code Installation code. */ - AppGuardWrapper(std::shared_ptr channel, const std::string &app_id, const std::string &app_secret); - - /** - * @brief Validates the current status of the assosiated device. - * - * Throws an exception if the stream is not in a valid state. - */ - void ValidateStatus() const; + AppGuardWrapper(std::shared_ptr channel, const std::string &installation_code); /** * @brief Retrieves the current authentication token. @@ -97,5 +88,3 @@ class AppGuardWrapper // Stream handling continuous communication with AppGuard. std::shared_ptr stream; }; - -#endif \ No newline at end of file diff --git a/src/generated/appguard.grpc.pb.cc b/src/generated/appguard.grpc.pb.cc new file mode 100644 index 0000000..0898d67 --- /dev/null +++ b/src/generated/appguard.grpc.pb.cc @@ -0,0 +1,407 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: appguard.proto + +#include "appguard.pb.h" +#include "appguard.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace appguard { + +static const char* AppGuard_method_names[] = { + "/appguard.AppGuard/ControlChannel", + "/appguard.AppGuard/HandleLogs", + "/appguard.AppGuard/HandleTcpConnection", + "/appguard.AppGuard/HandleHttpRequest", + "/appguard.AppGuard/HandleHttpResponse", + "/appguard.AppGuard/HandleSmtpRequest", + "/appguard.AppGuard/HandleSmtpResponse", + "/appguard.AppGuard/FirewallDefaultsRequest", +}; + +std::unique_ptr< AppGuard::Stub> AppGuard::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< AppGuard::Stub> stub(new AppGuard::Stub(channel)); + return stub; +} + +AppGuard::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_ControlChannel_(AppGuard_method_names[0], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel) + , rpcmethod_HandleLogs_(AppGuard_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HandleTcpConnection_(AppGuard_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HandleHttpRequest_(AppGuard_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HandleHttpResponse_(AppGuard_method_names[4], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HandleSmtpRequest_(AppGuard_method_names[5], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HandleSmtpResponse_(AppGuard_method_names[6], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_FirewallDefaultsRequest_(AppGuard_method_names[7], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::ClientReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* AppGuard::Stub::ControlChannelRaw(::grpc::ClientContext* context) { + return ::grpc_impl::internal::ClientReaderWriterFactory< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>::Create(channel_.get(), rpcmethod_ControlChannel_, context); +} + +void AppGuard::Stub::experimental_async::ControlChannel(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>* reactor) { + ::grpc_impl::internal::ClientCallbackReaderWriterFactory< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>::Create(stub_->channel_.get(), stub_->rpcmethod_ControlChannel_, context, reactor); +} + +::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* AppGuard::Stub::AsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>::Create(channel_.get(), cq, rpcmethod_ControlChannel_, context, true, tag); +} + +::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* AppGuard::Stub::PrepareAsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncReaderWriterFactory< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>::Create(channel_.get(), cq, rpcmethod_ControlChannel_, context, false, nullptr); +} + +::grpc::Status AppGuard::Stub::HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::google::protobuf::Empty* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleLogs_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleLogs_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleLogs_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleLogs_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleLogs_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AppGuard::Stub::AsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::google::protobuf::Empty>::Create(channel_.get(), cq, rpcmethod_HandleLogs_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AppGuard::Stub::PrepareAsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::google::protobuf::Empty>::Create(channel_.get(), cq, rpcmethod_HandleLogs_, context, request, false); +} + +::grpc::Status AppGuard::Stub::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleTcpConnection_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleTcpConnection_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AppGuard::Stub::AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardTcpResponse>::Create(channel_.get(), cq, rpcmethod_HandleTcpConnection_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AppGuard::Stub::PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardTcpResponse>::Create(channel_.get(), cq, rpcmethod_HandleTcpConnection_, context, request, false); +} + +::grpc::Status AppGuard::Stub::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleHttpRequest_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleHttpRequest_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleHttpRequest_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleHttpRequest_, context, request, false); +} + +::grpc::Status AppGuard::Stub::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleHttpResponse_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleHttpResponse_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleHttpResponse_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleHttpResponse_, context, request, false); +} + +::grpc::Status AppGuard::Stub::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleSmtpRequest_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpRequest_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleSmtpRequest_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleSmtpRequest_, context, request, false); +} + +::grpc::Status AppGuard::Stub::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HandleSmtpResponse_, context, request, response); +} + +void AppGuard::Stub::experimental_async::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HandleSmtpResponse_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleSmtpResponse_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AppGuard::Stub::PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard::AppGuardResponse>::Create(channel_.get(), cq, rpcmethod_HandleSmtpResponse_, context, request, false); +} + +::grpc::Status AppGuard::Stub::FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::appguard_commands::FirewallDefaults* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_FirewallDefaultsRequest_, context, request, response); +} + +void AppGuard::Stub::experimental_async::FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_FirewallDefaultsRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_FirewallDefaultsRequest_, context, request, response, std::move(f)); +} + +void AppGuard::Stub::experimental_async::FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_FirewallDefaultsRequest_, context, request, response, reactor); +} + +void AppGuard::Stub::experimental_async::FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_FirewallDefaultsRequest_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>* AppGuard::Stub::AsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard_commands::FirewallDefaults>::Create(channel_.get(), cq, rpcmethod_FirewallDefaultsRequest_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>* AppGuard::Stub::PrepareAsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::appguard_commands::FirewallDefaults>::Create(channel_.get(), cq, rpcmethod_FirewallDefaultsRequest_, context, request, false); +} + +AppGuard::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[0], + ::grpc::internal::RpcMethod::BIDI_STREAMING, + new ::grpc::internal::BidiStreamingHandler< AppGuard::Service, ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + ::grpc_impl::ServerReaderWriter<::appguard_commands::ServerMessage, + ::appguard_commands::ClientMessage>* stream) { + return service->ControlChannel(ctx, stream); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::Logs, ::google::protobuf::Empty>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::Logs* req, + ::google::protobuf::Empty* resp) { + return service->HandleLogs(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::AppGuardTcpConnection* req, + ::appguard::AppGuardTcpResponse* resp) { + return service->HandleTcpConnection(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::AppGuardHttpRequest* req, + ::appguard::AppGuardResponse* resp) { + return service->HandleHttpRequest(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::AppGuardHttpResponse* req, + ::appguard::AppGuardResponse* resp) { + return service->HandleHttpResponse(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[5], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::AppGuardSmtpRequest* req, + ::appguard::AppGuardResponse* resp) { + return service->HandleSmtpRequest(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[6], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::AppGuardSmtpResponse* req, + ::appguard::AppGuardResponse* resp) { + return service->HandleSmtpResponse(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AppGuard_method_names[7], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AppGuard::Service, ::appguard::Token, ::appguard_commands::FirewallDefaults>( + [](AppGuard::Service* service, + ::grpc_impl::ServerContext* ctx, + const ::appguard::Token* req, + ::appguard_commands::FirewallDefaults* resp) { + return service->FirewallDefaultsRequest(ctx, req, resp); + }, this))); +} + +AppGuard::Service::~Service() { +} + +::grpc::Status AppGuard::Service::ControlChannel(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* stream) { + (void) context; + (void) stream; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleLogs(::grpc::ServerContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleTcpConnection(::grpc::ServerContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleHttpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleHttpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleSmtpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::HandleSmtpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AppGuard::Service::FirewallDefaultsRequest(::grpc::ServerContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace appguard + diff --git a/src/generated/appguard.grpc.pb.h b/src/generated/appguard.grpc.pb.h new file mode 100644 index 0000000..cc96551 --- /dev/null +++ b/src/generated/appguard.grpc.pb.h @@ -0,0 +1,1769 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: appguard.proto +#ifndef GRPC_appguard_2eproto__INCLUDED +#define GRPC_appguard_2eproto__INCLUDED + +#include "appguard.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace appguard { + +class AppGuard final { + public: + static constexpr char const* service_full_name() { + return "appguard.AppGuard"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Control channel + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> ControlChannel(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(ControlChannelRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> AsyncControlChannel(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(AsyncControlChannelRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> PrepareAsyncControlChannel(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(PrepareAsyncControlChannelRaw(context, cq)); + } + // Logs + virtual ::grpc::Status HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::google::protobuf::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncHandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncHandleLogsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncHandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncHandleLogsRaw(context, request, cq)); + } + // TCP + virtual ::grpc::Status HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>> AsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>>(AsyncHandleTcpConnectionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>> PrepareAsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>>(PrepareAsyncHandleTcpConnectionRaw(context, request, cq)); + } + // HTTP + virtual ::grpc::Status HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleHttpRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpRequestRaw(context, request, cq)); + } + virtual ::grpc::Status HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleHttpResponseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpResponseRaw(context, request, cq)); + } + // SMTP + virtual ::grpc::Status HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleSmtpRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpRequestRaw(context, request, cq)); + } + virtual ::grpc::Status HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> AsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(AsyncHandleSmtpResponseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpResponseRaw(context, request, cq)); + } + // Other + virtual ::grpc::Status FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::appguard_commands::FirewallDefaults* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>> AsyncFirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>>(AsyncFirewallDefaultsRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>> PrepareAsyncFirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>>(PrepareAsyncFirewallDefaultsRequestRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // Control channel + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void ControlChannel(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>* reactor) = 0; + #else + virtual void ControlChannel(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>* reactor) = 0; + #endif + // Logs + virtual void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, std::function) = 0; + virtual void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // TCP + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function) = 0; + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // HTTP + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function) = 0; + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function) = 0; + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // SMTP + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function) = 0; + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function) = 0; + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + // Other + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, std::function) = 0; + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, std::function) = 0; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, ::grpc::ClientUnaryReactor* reactor) = 0; + #else + virtual void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + #endif + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef class experimental_async_interface async_interface; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + async_interface* async() { return experimental_async(); } + #endif + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* ControlChannelRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* AsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* PrepareAsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>* AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardTcpResponse>* PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>* AsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::appguard_commands::FirewallDefaults>* PrepareAsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> ControlChannel(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(ControlChannelRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> AsyncControlChannel(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(AsyncControlChannelRaw(context, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>> PrepareAsyncControlChannel(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>>(PrepareAsyncControlChannelRaw(context, cq)); + } + ::grpc::Status HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::google::protobuf::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncHandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncHandleLogsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncHandleLogs(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncHandleLogsRaw(context, request, cq)); + } + ::grpc::Status HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::appguard::AppGuardTcpResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>> AsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>>(AsyncHandleTcpConnectionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>> PrepareAsyncHandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>>(PrepareAsyncHandleTcpConnectionRaw(context, request, cq)); + } + ::grpc::Status HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::appguard::AppGuardResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleHttpRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpRequestRaw(context, request, cq)); + } + ::grpc::Status HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::appguard::AppGuardResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleHttpResponseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleHttpResponseRaw(context, request, cq)); + } + ::grpc::Status HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::appguard::AppGuardResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleSmtpRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpRequestRaw(context, request, cq)); + } + ::grpc::Status HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::appguard::AppGuardResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> AsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(AsyncHandleSmtpResponseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>> PrepareAsyncHandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>>(PrepareAsyncHandleSmtpResponseRaw(context, request, cq)); + } + ::grpc::Status FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::appguard_commands::FirewallDefaults* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>> AsyncFirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>>(AsyncFirewallDefaultsRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>> PrepareAsyncFirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>>(PrepareAsyncFirewallDefaultsRequestRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void ControlChannel(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>* reactor) override; + #else + void ControlChannel(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::appguard_commands::ClientMessage,::appguard_commands::ServerMessage>* reactor) override; + #endif + void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, std::function) override; + void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleLogs(::grpc::ClientContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleLogs(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::google::protobuf::Empty* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, std::function) override; + void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleTcpConnection(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleTcpConnection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardTcpResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, std::function) override; + void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleHttpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleHttpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, std::function) override; + void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleHttpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleHttpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, std::function) override; + void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleSmtpRequest(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleSmtpRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, std::function) override; + void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleSmtpResponse(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void HandleSmtpResponse(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard::AppGuardResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, std::function) override; + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, std::function) override; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, ::grpc::ClientUnaryReactor* reactor) override; + #else + void FirewallDefaultsRequest(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::appguard_commands::FirewallDefaults* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + #endif + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* ControlChannelRaw(::grpc::ClientContext* context) override; + ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* AsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReaderWriter< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* PrepareAsyncControlChannelRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncHandleLogsRaw(::grpc::ClientContext* context, const ::appguard::Logs& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* AsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardTcpResponse>* PrepareAsyncHandleTcpConnectionRaw(::grpc::ClientContext* context, const ::appguard::AppGuardTcpConnection& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleHttpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardHttpResponse& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpRequestRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* AsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard::AppGuardResponse>* PrepareAsyncHandleSmtpResponseRaw(::grpc::ClientContext* context, const ::appguard::AppGuardSmtpResponse& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>* AsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::appguard_commands::FirewallDefaults>* PrepareAsyncFirewallDefaultsRequestRaw(::grpc::ClientContext* context, const ::appguard::Token& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ControlChannel_; + const ::grpc::internal::RpcMethod rpcmethod_HandleLogs_; + const ::grpc::internal::RpcMethod rpcmethod_HandleTcpConnection_; + const ::grpc::internal::RpcMethod rpcmethod_HandleHttpRequest_; + const ::grpc::internal::RpcMethod rpcmethod_HandleHttpResponse_; + const ::grpc::internal::RpcMethod rpcmethod_HandleSmtpRequest_; + const ::grpc::internal::RpcMethod rpcmethod_HandleSmtpResponse_; + const ::grpc::internal::RpcMethod rpcmethod_FirewallDefaultsRequest_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Control channel + virtual ::grpc::Status ControlChannel(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* stream); + // Logs + virtual ::grpc::Status HandleLogs(::grpc::ServerContext* context, const ::appguard::Logs* request, ::google::protobuf::Empty* response); + // TCP + virtual ::grpc::Status HandleTcpConnection(::grpc::ServerContext* context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response); + // HTTP + virtual ::grpc::Status HandleHttpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response); + virtual ::grpc::Status HandleHttpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response); + // SMTP + virtual ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response); + virtual ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response); + // Other + virtual ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response); + }; + template + class WithAsyncMethod_ControlChannel : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ControlChannel() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ControlChannel() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ControlChannel(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestControlChannel(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleLogs() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleLogs(::grpc::ServerContext* context, ::appguard::Logs* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleTcpConnection() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleTcpConnection(::grpc::ServerContext* context, ::appguard::AppGuardTcpConnection* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardTcpResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleHttpRequest() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleHttpRequest(::grpc::ServerContext* context, ::appguard::AppGuardHttpRequest* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleHttpResponse() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleHttpResponse(::grpc::ServerContext* context, ::appguard::AppGuardHttpResponse* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleSmtpRequest() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleSmtpRequest(::grpc::ServerContext* context, ::appguard::AppGuardSmtpRequest* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HandleSmtpResponse() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleSmtpResponse(::grpc::ServerContext* context, ::appguard::AppGuardSmtpResponse* request, ::grpc::ServerAsyncResponseWriter< ::appguard::AppGuardResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_FirewallDefaultsRequest() { + ::grpc::Service::MarkMethodAsync(7); + } + ~WithAsyncMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestFirewallDefaultsRequest(::grpc::ServerContext* context, ::appguard::Token* request, ::grpc::ServerAsyncResponseWriter< ::appguard_commands::FirewallDefaults>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ControlChannel > > > > > > > AsyncService; + template + class ExperimentalWithCallbackMethod_ControlChannel : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_ControlChannel() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(0, + new ::grpc_impl::internal::CallbackBidiHandler< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->ControlChannel(context); })); + } + ~ExperimentalWithCallbackMethod_ControlChannel() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ControlChannel(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* ControlChannel( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::appguard_commands::ClientMessage, ::appguard_commands::ServerMessage>* ControlChannel( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleLogs() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::Logs, ::google::protobuf::Empty>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::Logs* request, ::google::protobuf::Empty* response) { return this->HandleLogs(context, request, response); }));} + void SetMessageAllocatorFor_HandleLogs( + ::grpc::experimental::MessageAllocator< ::appguard::Logs, ::google::protobuf::Empty>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::Logs, ::google::protobuf::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleLogs( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleLogs( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleTcpConnection() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::AppGuardTcpConnection* request, ::appguard::AppGuardTcpResponse* response) { return this->HandleTcpConnection(context, request, response); }));} + void SetMessageAllocatorFor_HandleTcpConnection( + ::grpc::experimental::MessageAllocator< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleTcpConnection( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleTcpConnection( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleHttpRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(3, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::AppGuardHttpRequest* request, ::appguard::AppGuardResponse* response) { return this->HandleHttpRequest(context, request, response); }));} + void SetMessageAllocatorFor_HandleHttpRequest( + ::grpc::experimental::MessageAllocator< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(3); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleHttpRequest( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleHttpRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleHttpResponse() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::AppGuardHttpResponse* request, ::appguard::AppGuardResponse* response) { return this->HandleHttpResponse(context, request, response); }));} + void SetMessageAllocatorFor_HandleHttpResponse( + ::grpc::experimental::MessageAllocator< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(4); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleHttpResponse( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleHttpResponse( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleSmtpRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::AppGuardSmtpRequest* request, ::appguard::AppGuardResponse* response) { return this->HandleSmtpRequest(context, request, response); }));} + void SetMessageAllocatorFor_HandleSmtpRequest( + ::grpc::experimental::MessageAllocator< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(5); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleSmtpRequest( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleSmtpRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HandleSmtpResponse() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::AppGuardSmtpResponse* request, ::appguard::AppGuardResponse* response) { return this->HandleSmtpResponse(context, request, response); }));} + void SetMessageAllocatorFor_HandleSmtpResponse( + ::grpc::experimental::MessageAllocator< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(6); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleSmtpResponse( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleSmtpResponse( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithCallbackMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_FirewallDefaultsRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodCallback(7, + new ::grpc_impl::internal::CallbackUnaryHandler< ::appguard::Token, ::appguard_commands::FirewallDefaults>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::appguard::Token* request, ::appguard_commands::FirewallDefaults* response) { return this->FirewallDefaultsRequest(context, request, response); }));} + void SetMessageAllocatorFor_FirewallDefaultsRequest( + ::grpc::experimental::MessageAllocator< ::appguard::Token, ::appguard_commands::FirewallDefaults>* allocator) { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); + #else + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(7); + #endif + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::appguard::Token, ::appguard_commands::FirewallDefaults>*>(handler) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* FirewallDefaultsRequest( + ::grpc::CallbackServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* FirewallDefaultsRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) + #endif + { return nullptr; } + }; + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + typedef ExperimentalWithCallbackMethod_ControlChannel > > > > > > > CallbackService; + #endif + + typedef ExperimentalWithCallbackMethod_ControlChannel > > > > > > > ExperimentalCallbackService; + template + class WithGenericMethod_ControlChannel : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ControlChannel() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ControlChannel() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ControlChannel(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleLogs() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleTcpConnection() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleHttpRequest() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleHttpResponse() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleSmtpRequest() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HandleSmtpResponse() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_FirewallDefaultsRequest() { + ::grpc::Service::MarkMethodGeneric(7); + } + ~WithGenericMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ControlChannel : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ControlChannel() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ControlChannel() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ControlChannel(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestControlChannel(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleLogs() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleLogs(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleTcpConnection() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleTcpConnection(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleHttpRequest() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleHttpRequest(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleHttpResponse() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleHttpResponse(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleSmtpRequest() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleSmtpRequest(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HandleSmtpResponse() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHandleSmtpResponse(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_FirewallDefaultsRequest() { + ::grpc::Service::MarkMethodRaw(7); + } + ~WithRawMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestFirewallDefaultsRequest(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_ControlChannel : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_ControlChannel() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(0, + new ::grpc_impl::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context) { return this->ControlChannel(context); })); + } + ~ExperimentalWithRawCallbackMethod_ControlChannel() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ControlChannel(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::appguard_commands::ServerMessage, ::appguard_commands::ClientMessage>* /*stream*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* ControlChannel( + ::grpc::CallbackServerContext* /*context*/) + #else + virtual ::grpc::experimental::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* ControlChannel( + ::grpc::experimental::CallbackServerContext* /*context*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleLogs() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(1, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleLogs(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleLogs( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleLogs( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleTcpConnection() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(2, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleTcpConnection(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleTcpConnection( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleTcpConnection( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleHttpRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(3, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleHttpRequest(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleHttpRequest( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleHttpRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleHttpResponse() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(4, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleHttpResponse(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleHttpResponse( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleHttpResponse( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleSmtpRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(5, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleSmtpRequest(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleSmtpRequest( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleSmtpRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HandleSmtpResponse() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(6, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HandleSmtpResponse(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* HandleSmtpResponse( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* HandleSmtpResponse( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class ExperimentalWithRawCallbackMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_FirewallDefaultsRequest() { + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::Service:: + #else + ::grpc::Service::experimental(). + #endif + MarkMethodRawCallback(7, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + ::grpc::CallbackServerContext* + #else + ::grpc::experimental::CallbackServerContext* + #endif + context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->FirewallDefaultsRequest(context, request, response); })); + } + ~ExperimentalWithRawCallbackMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + virtual ::grpc::ServerUnaryReactor* FirewallDefaultsRequest( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #else + virtual ::grpc::experimental::ServerUnaryReactor* FirewallDefaultsRequest( + ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) + #endif + { return nullptr; } + }; + template + class WithStreamedUnaryMethod_HandleLogs : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleLogs() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::Logs, ::google::protobuf::Empty>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::Logs, ::google::protobuf::Empty>* streamer) { + return this->StreamedHandleLogs(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleLogs() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleLogs(::grpc::ServerContext* /*context*/, const ::appguard::Logs* /*request*/, ::google::protobuf::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleLogs(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::Logs,::google::protobuf::Empty>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HandleTcpConnection : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleTcpConnection() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::AppGuardTcpConnection, ::appguard::AppGuardTcpResponse>* streamer) { + return this->StreamedHandleTcpConnection(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleTcpConnection() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleTcpConnection(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardTcpConnection* /*request*/, ::appguard::AppGuardTcpResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleTcpConnection(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardTcpConnection,::appguard::AppGuardTcpResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HandleHttpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleHttpRequest() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::AppGuardHttpRequest, ::appguard::AppGuardResponse>* streamer) { + return this->StreamedHandleHttpRequest(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleHttpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleHttpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleHttpRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardHttpRequest,::appguard::AppGuardResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HandleHttpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleHttpResponse() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::AppGuardHttpResponse, ::appguard::AppGuardResponse>* streamer) { + return this->StreamedHandleHttpResponse(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleHttpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleHttpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardHttpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleHttpResponse(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardHttpResponse,::appguard::AppGuardResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HandleSmtpRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleSmtpRequest() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::AppGuardSmtpRequest, ::appguard::AppGuardResponse>* streamer) { + return this->StreamedHandleSmtpRequest(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleSmtpRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleSmtpRequest(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpRequest* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleSmtpRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardSmtpRequest,::appguard::AppGuardResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HandleSmtpResponse : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HandleSmtpResponse() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::AppGuardSmtpResponse, ::appguard::AppGuardResponse>* streamer) { + return this->StreamedHandleSmtpResponse(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HandleSmtpResponse() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HandleSmtpResponse(::grpc::ServerContext* /*context*/, const ::appguard::AppGuardSmtpResponse* /*request*/, ::appguard::AppGuardResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHandleSmtpResponse(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::AppGuardSmtpResponse,::appguard::AppGuardResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_FirewallDefaultsRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_FirewallDefaultsRequest() { + ::grpc::Service::MarkMethodStreamed(7, + new ::grpc::internal::StreamedUnaryHandler< + ::appguard::Token, ::appguard_commands::FirewallDefaults>( + [this](::grpc_impl::ServerContext* context, + ::grpc_impl::ServerUnaryStreamer< + ::appguard::Token, ::appguard_commands::FirewallDefaults>* streamer) { + return this->StreamedFirewallDefaultsRequest(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_FirewallDefaultsRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status FirewallDefaultsRequest(::grpc::ServerContext* /*context*/, const ::appguard::Token* /*request*/, ::appguard_commands::FirewallDefaults* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedFirewallDefaultsRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::appguard::Token,::appguard_commands::FirewallDefaults>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_HandleLogs > > > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_HandleLogs > > > > > > StreamedService; +}; + +} // namespace appguard + + +#endif // GRPC_appguard_2eproto__INCLUDED diff --git a/src/generated/appguard.pb.cc b/src/generated/appguard.pb.cc new file mode 100644 index 0000000..9f3e6ae --- /dev/null +++ b/src/generated/appguard.pb.cc @@ -0,0 +1,4764 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: appguard.proto + +#include "appguard.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardIpInfo_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardTcpConnection_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AppGuardTcpInfo_appguard_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_appguard_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Log_appguard_2eproto; +namespace appguard { +class LogsDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Logs_default_instance_; +class LogDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Log_default_instance_; +class AppGuardTcpConnectionDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardTcpConnection_default_instance_; +class AppGuardIpInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardIpInfo_default_instance_; +class AppGuardTcpInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardTcpInfo_default_instance_; +class AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_; +class AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_; +class AppGuardHttpRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardHttpRequest_default_instance_; +class AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_; +class AppGuardHttpResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardHttpResponse_default_instance_; +class AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_; +class AppGuardSmtpRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardSmtpRequest_default_instance_; +class AppGuardSmtpResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardSmtpResponse_default_instance_; +class AppGuardResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardResponse_default_instance_; +class AppGuardTcpResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AppGuardTcpResponse_default_instance_; +class TokenDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Token_default_instance_; +} // namespace appguard +static void InitDefaultsscc_info_AppGuardHttpRequest_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardHttpRequest_default_instance_; + new (ptr) ::appguard::AppGuardHttpRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardHttpRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_AppGuardHttpRequest_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_AppGuardHttpRequest_appguard_2eproto}, { + &scc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardTcpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_; + new (ptr) ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse(); + } + ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_; + new (ptr) ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse(); + } + ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardHttpResponse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardHttpResponse_default_instance_; + new (ptr) ::appguard::AppGuardHttpResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardHttpResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AppGuardHttpResponse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_AppGuardHttpResponse_appguard_2eproto}, { + &scc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardTcpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_; + new (ptr) ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse(); + } + ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardIpInfo_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardIpInfo_default_instance_; + new (ptr) ::appguard::AppGuardIpInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardIpInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardIpInfo_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardIpInfo_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardResponse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardResponse_default_instance_; + new (ptr) ::appguard::AppGuardResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardResponse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardResponse_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardSmtpRequest_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardSmtpRequest_default_instance_; + new (ptr) ::appguard::AppGuardSmtpRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardSmtpRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AppGuardSmtpRequest_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_AppGuardSmtpRequest_appguard_2eproto}, { + &scc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardTcpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_; + new (ptr) ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse(); + } + ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardSmtpResponse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardSmtpResponse_default_instance_; + new (ptr) ::appguard::AppGuardSmtpResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardSmtpResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AppGuardSmtpResponse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_AppGuardSmtpResponse_appguard_2eproto}, { + &scc_info_AppGuardTcpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_AppGuardTcpConnection_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardTcpConnection_default_instance_; + new (ptr) ::appguard::AppGuardTcpConnection(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardTcpConnection::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AppGuardTcpConnection_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AppGuardTcpConnection_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_AppGuardTcpInfo_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardTcpInfo_default_instance_; + new (ptr) ::appguard::AppGuardTcpInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardTcpInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AppGuardTcpInfo_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_AppGuardTcpInfo_appguard_2eproto}, { + &scc_info_AppGuardTcpConnection_appguard_2eproto.base, + &scc_info_AppGuardIpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_AppGuardTcpResponse_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_AppGuardTcpResponse_default_instance_; + new (ptr) ::appguard::AppGuardTcpResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::AppGuardTcpResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AppGuardTcpResponse_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_AppGuardTcpResponse_appguard_2eproto}, { + &scc_info_AppGuardTcpInfo_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_Log_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_Log_default_instance_; + new (ptr) ::appguard::Log(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::Log::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Log_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Log_appguard_2eproto}, {}}; + +static void InitDefaultsscc_info_Logs_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_Logs_default_instance_; + new (ptr) ::appguard::Logs(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::Logs::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Logs_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Logs_appguard_2eproto}, { + &scc_info_Log_appguard_2eproto.base,}}; + +static void InitDefaultsscc_info_Token_appguard_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard::_Token_default_instance_; + new (ptr) ::appguard::Token(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard::Token::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Token_appguard_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Token_appguard_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_appguard_2eproto[16]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_appguard_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_appguard_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_appguard_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::Logs, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::Logs, token_), + PROTOBUF_FIELD_OFFSET(::appguard::Logs, logs_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::Log, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::Log, timestamp_), + PROTOBUF_FIELD_OFFSET(::appguard::Log, level_), + PROTOBUF_FIELD_OFFSET(::appguard::Log, message_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, token_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, source_ip_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, source_port_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, destination_ip_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, destination_port_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpConnection, protocol_), + ~0u, + 0, + 2, + 1, + 3, + ~0u, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, ip_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, country_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, asn_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, org_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, continent_code_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, city_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, region_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, postal_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, timezone_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardIpInfo, blacklist_), + ~0u, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, connection_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, ip_info_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpInfo, tcp_id_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, token_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, original_url_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, headers_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, method_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, body_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, query_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpRequest, tcp_info_), + ~0u, + ~0u, + ~0u, + ~0u, + 0, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, token_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, code_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, headers_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardHttpResponse, tcp_info_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, token_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, headers_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, body_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpRequest, tcp_info_), + ~0u, + ~0u, + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, token_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, code_), + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardSmtpResponse, tcp_info_), + ~0u, + 0, + ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardResponse, policy_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::AppGuardTcpResponse, tcp_info_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard::Token, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard::Token, token_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::appguard::Logs)}, + { 7, -1, sizeof(::appguard::Log)}, + { 15, 26, sizeof(::appguard::AppGuardTcpConnection)}, + { 32, 47, sizeof(::appguard::AppGuardIpInfo)}, + { 57, -1, sizeof(::appguard::AppGuardTcpInfo)}, + { 65, 72, sizeof(::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse)}, + { 74, 81, sizeof(::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse)}, + { 83, 95, sizeof(::appguard::AppGuardHttpRequest)}, + { 102, 109, sizeof(::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse)}, + { 111, -1, sizeof(::appguard::AppGuardHttpResponse)}, + { 120, 127, sizeof(::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse)}, + { 129, 138, sizeof(::appguard::AppGuardSmtpRequest)}, + { 142, 150, sizeof(::appguard::AppGuardSmtpResponse)}, + { 153, -1, sizeof(::appguard::AppGuardResponse)}, + { 159, -1, sizeof(::appguard::AppGuardTcpResponse)}, + { 165, -1, sizeof(::appguard::Token)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::appguard::_Logs_default_instance_), + reinterpret_cast(&::appguard::_Log_default_instance_), + reinterpret_cast(&::appguard::_AppGuardTcpConnection_default_instance_), + reinterpret_cast(&::appguard::_AppGuardIpInfo_default_instance_), + reinterpret_cast(&::appguard::_AppGuardTcpInfo_default_instance_), + reinterpret_cast(&::appguard::_AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardHttpRequest_default_instance_), + reinterpret_cast(&::appguard::_AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardHttpResponse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardSmtpRequest_default_instance_), + reinterpret_cast(&::appguard::_AppGuardSmtpResponse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardResponse_default_instance_), + reinterpret_cast(&::appguard::_AppGuardTcpResponse_default_instance_), + reinterpret_cast(&::appguard::_Token_default_instance_), +}; + +const char descriptor_table_protodef_appguard_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\016appguard.proto\022\010appguard\032\033google/proto" + "buf/empty.proto\032\016commands.proto\"2\n\004Logs\022" + "\r\n\005token\030\001 \001(\t\022\033\n\004logs\030\003 \003(\0132\r.appguard." + "Log\"8\n\003Log\022\021\n\ttimestamp\030\001 \001(\t\022\r\n\005level\030\002" + " \001(\t\022\017\n\007message\030\003 \001(\t\"\354\001\n\025AppGuardTcpCon" + "nection\022\r\n\005token\030\001 \001(\t\022\026\n\tsource_ip\030\002 \001(" + "\tH\000\210\001\001\022\030\n\013source_port\030\003 \001(\rH\001\210\001\001\022\033\n\016dest" + "ination_ip\030\004 \001(\tH\002\210\001\001\022\035\n\020destination_por" + "t\030\005 \001(\rH\003\210\001\001\022\020\n\010protocol\030\006 \001(\tB\014\n\n_sourc" + "e_ipB\016\n\014_source_portB\021\n\017_destination_ipB" + "\023\n\021_destination_port\"\265\002\n\016AppGuardIpInfo\022" + "\n\n\002ip\030\001 \001(\t\022\024\n\007country\030\002 \001(\tH\000\210\001\001\022\020\n\003asn" + "\030\003 \001(\tH\001\210\001\001\022\020\n\003org\030\004 \001(\tH\002\210\001\001\022\033\n\016contine" + "nt_code\030\005 \001(\tH\003\210\001\001\022\021\n\004city\030\006 \001(\tH\004\210\001\001\022\023\n" + "\006region\030\007 \001(\tH\005\210\001\001\022\023\n\006postal\030\010 \001(\tH\006\210\001\001\022" + "\025\n\010timezone\030\t \001(\tH\007\210\001\001\022\021\n\tblacklist\030d \001(" + "\010B\n\n\010_countryB\006\n\004_asnB\006\n\004_orgB\021\n\017_contin" + "ent_codeB\007\n\005_cityB\t\n\007_regionB\t\n\007_postalB" + "\013\n\t_timezone\"\201\001\n\017AppGuardTcpInfo\0223\n\nconn" + "ection\030\001 \001(\0132\037.appguard.AppGuardTcpConne" + "ction\022)\n\007ip_info\030\002 \001(\0132\030.appguard.AppGua" + "rdIpInfo\022\016\n\006tcp_id\030\003 \001(\004\"\347\002\n\023AppGuardHtt" + "pRequest\022\r\n\005token\030\001 \001(\t\022\024\n\014original_url\030" + "\002 \001(\t\022;\n\007headers\030\003 \003(\0132*.appguard.AppGua" + "rdHttpRequest.HeadersEntry\022\016\n\006method\030\004 \001" + "(\t\022\021\n\004body\030\005 \001(\tH\000\210\001\001\0227\n\005query\030\006 \003(\0132(.a" + "ppguard.AppGuardHttpRequest.QueryEntry\022+" + "\n\010tcp_info\030d \001(\0132\031.appguard.AppGuardTcpI" + "nfo\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + "e\030\002 \001(\t:\0028\001\032,\n\nQueryEntry\022\013\n\003key\030\001 \001(\t\022\r" + "\n\005value\030\002 \001(\t:\0028\001B\007\n\005_body\"\316\001\n\024AppGuardH" + "ttpResponse\022\r\n\005token\030\001 \001(\t\022\014\n\004code\030\002 \001(\r" + "\022<\n\007headers\030\003 \003(\0132+.appguard.AppGuardHtt" + "pResponse.HeadersEntry\022+\n\010tcp_info\030d \001(\013" + "2\031.appguard.AppGuardTcpInfo\032.\n\014HeadersEn" + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\332\001\n\023" + "AppGuardSmtpRequest\022\r\n\005token\030\001 \001(\t\022;\n\007he" + "aders\030\002 \003(\0132*.appguard.AppGuardSmtpReque" + "st.HeadersEntry\022\021\n\004body\030\003 \001(\tH\000\210\001\001\022+\n\010tc" + "p_info\030d \001(\0132\031.appguard.AppGuardTcpInfo\032" + ".\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + "\001(\t:\0028\001B\007\n\005_body\"n\n\024AppGuardSmtpResponse" + "\022\r\n\005token\030\001 \001(\t\022\021\n\004code\030\002 \001(\rH\000\210\001\001\022+\n\010tc" + "p_info\030d \001(\0132\031.appguard.AppGuardTcpInfoB" + "\007\n\005_code\"E\n\020AppGuardResponse\0221\n\006policy\030\002" + " \001(\0162!.appguard_commands.FirewallPolicy\"" + "B\n\023AppGuardTcpResponse\022+\n\010tcp_info\030\001 \001(\013" + "2\031.appguard.AppGuardTcpInfo\"\026\n\005Token\022\r\n\005" + "token\030\001 \001(\t2\206\005\n\010AppGuard\022X\n\016ControlChann" + "el\022 .appguard_commands.ClientMessage\032 .a" + "ppguard_commands.ServerMessage(\0010\001\0224\n\nHa" + "ndleLogs\022\016.appguard.Logs\032\026.google.protob" + "uf.Empty\022U\n\023HandleTcpConnection\022\037.appgua" + "rd.AppGuardTcpConnection\032\035.appguard.AppG" + "uardTcpResponse\022N\n\021HandleHttpRequest\022\035.a" + "ppguard.AppGuardHttpRequest\032\032.appguard.A" + "ppGuardResponse\022P\n\022HandleHttpResponse\022\036." + "appguard.AppGuardHttpResponse\032\032.appguard" + ".AppGuardResponse\022N\n\021HandleSmtpRequest\022\035" + ".appguard.AppGuardSmtpRequest\032\032.appguard" + ".AppGuardResponse\022P\n\022HandleSmtpResponse\022" + "\036.appguard.AppGuardSmtpResponse\032\032.appgua" + "rd.AppGuardResponse\022O\n\027FirewallDefaultsR" + "equest\022\017.appguard.Token\032#.appguard_comma" + "nds.FirewallDefaultsb\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_appguard_2eproto_deps[2] = { + &::descriptor_table_commands_2eproto, + &::descriptor_table_google_2fprotobuf_2fempty_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_appguard_2eproto_sccs[16] = { + &scc_info_AppGuardHttpRequest_appguard_2eproto.base, + &scc_info_AppGuardHttpRequest_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardHttpRequest_QueryEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardHttpResponse_appguard_2eproto.base, + &scc_info_AppGuardHttpResponse_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardIpInfo_appguard_2eproto.base, + &scc_info_AppGuardResponse_appguard_2eproto.base, + &scc_info_AppGuardSmtpRequest_appguard_2eproto.base, + &scc_info_AppGuardSmtpRequest_HeadersEntry_DoNotUse_appguard_2eproto.base, + &scc_info_AppGuardSmtpResponse_appguard_2eproto.base, + &scc_info_AppGuardTcpConnection_appguard_2eproto.base, + &scc_info_AppGuardTcpInfo_appguard_2eproto.base, + &scc_info_AppGuardTcpResponse_appguard_2eproto.base, + &scc_info_Log_appguard_2eproto.base, + &scc_info_Logs_appguard_2eproto.base, + &scc_info_Token_appguard_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_appguard_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_appguard_2eproto = { + false, false, descriptor_table_protodef_appguard_2eproto, "appguard.proto", 2588, + &descriptor_table_appguard_2eproto_once, descriptor_table_appguard_2eproto_sccs, descriptor_table_appguard_2eproto_deps, 16, 2, + schemas, file_default_instances, TableStruct_appguard_2eproto::offsets, + file_level_metadata_appguard_2eproto, 16, file_level_enum_descriptors_appguard_2eproto, file_level_service_descriptors_appguard_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_appguard_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_appguard_2eproto)), true); +namespace appguard { + +// =================================================================== + +void Logs::InitAsDefaultInstance() { +} +class Logs::_Internal { + public: +}; + +Logs::Logs(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + logs_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.Logs) +} +Logs::Logs(const Logs& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + logs_(from.logs_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard.Logs) +} + +void Logs::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Logs_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Logs::~Logs() { + // @@protoc_insertion_point(destructor:appguard.Logs) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Logs::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Logs::ArenaDtor(void* object) { + Logs* _this = reinterpret_cast< Logs* >(object); + (void)_this; +} +void Logs::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Logs::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Logs& Logs::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Logs_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void Logs::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.Logs) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + logs_.Clear(); + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Logs::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.Logs.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .appguard.Log logs = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_logs(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Logs::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.Logs) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.Logs.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // repeated .appguard.Log logs = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_logs_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_logs(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.Logs) + return target; +} + +size_t Logs::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.Logs) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .appguard.Log logs = 3; + total_size += 1UL * this->_internal_logs_size(); + for (const auto& msg : this->logs_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Logs::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.Logs) + GOOGLE_DCHECK_NE(&from, this); + const Logs* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.Logs) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.Logs) + MergeFrom(*source); + } +} + +void Logs::MergeFrom(const Logs& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.Logs) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + logs_.MergeFrom(from.logs_); + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } +} + +void Logs::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.Logs) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Logs::CopyFrom(const Logs& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.Logs) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Logs::IsInitialized() const { + return true; +} + +void Logs::InternalSwap(Logs* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + logs_.InternalSwap(&other->logs_); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Logs::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Log::InitAsDefaultInstance() { +} +class Log::_Internal { + public: +}; + +Log::Log(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.Log) +} +Log::Log(const Log& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + timestamp_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_timestamp().empty()) { + timestamp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_timestamp(), + GetArena()); + } + level_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_level().empty()) { + level_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_level(), + GetArena()); + } + message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_message().empty()) { + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_message(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard.Log) +} + +void Log::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Log_appguard_2eproto.base); + timestamp_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + level_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Log::~Log() { + // @@protoc_insertion_point(destructor:appguard.Log) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Log::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + timestamp_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + level_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Log::ArenaDtor(void* object) { + Log* _this = reinterpret_cast< Log* >(object); + (void)_this; +} +void Log::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Log::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Log& Log::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Log_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void Log::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.Log) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + timestamp_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + level_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Log::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string timestamp = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_timestamp(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.Log.timestamp")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string level = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_level(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.Log.level")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string message = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.Log.message")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Log::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.Log) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string timestamp = 1; + if (this->timestamp().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_timestamp().data(), static_cast(this->_internal_timestamp().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.Log.timestamp"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_timestamp(), target); + } + + // string level = 2; + if (this->level().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_level().data(), static_cast(this->_internal_level().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.Log.level"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_level(), target); + } + + // string message = 3; + if (this->message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_message().data(), static_cast(this->_internal_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.Log.message"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_message(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.Log) + return target; +} + +size_t Log::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.Log) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string timestamp = 1; + if (this->timestamp().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_timestamp()); + } + + // string level = 2; + if (this->level().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_level()); + } + + // string message = 3; + if (this->message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_message()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Log::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.Log) + GOOGLE_DCHECK_NE(&from, this); + const Log* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.Log) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.Log) + MergeFrom(*source); + } +} + +void Log::MergeFrom(const Log& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.Log) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.timestamp().size() > 0) { + _internal_set_timestamp(from._internal_timestamp()); + } + if (from.level().size() > 0) { + _internal_set_level(from._internal_level()); + } + if (from.message().size() > 0) { + _internal_set_message(from._internal_message()); + } +} + +void Log::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.Log) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Log::CopyFrom(const Log& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.Log) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Log::IsInitialized() const { + return true; +} + +void Log::InternalSwap(Log* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + timestamp_.Swap(&other->timestamp_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + level_.Swap(&other->level_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + message_.Swap(&other->message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Log::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardTcpConnection::InitAsDefaultInstance() { +} +class AppGuardTcpConnection::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_source_ip(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_source_port(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_destination_ip(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_destination_port(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +AppGuardTcpConnection::AppGuardTcpConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpConnection) +} +AppGuardTcpConnection::AppGuardTcpConnection(const AppGuardTcpConnection& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + source_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_source_ip()) { + source_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_source_ip(), + GetArena()); + } + destination_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_destination_ip()) { + destination_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_destination_ip(), + GetArena()); + } + protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_protocol().empty()) { + protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_protocol(), + GetArena()); + } + ::memcpy(&source_port_, &from.source_port_, + static_cast(reinterpret_cast(&destination_port_) - + reinterpret_cast(&source_port_)) + sizeof(destination_port_)); + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpConnection) +} + +void AppGuardTcpConnection::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardTcpConnection_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + source_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + destination_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&source_port_, 0, static_cast( + reinterpret_cast(&destination_port_) - + reinterpret_cast(&source_port_)) + sizeof(destination_port_)); +} + +AppGuardTcpConnection::~AppGuardTcpConnection() { + // @@protoc_insertion_point(destructor:appguard.AppGuardTcpConnection) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardTcpConnection::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + source_ip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + destination_ip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AppGuardTcpConnection::ArenaDtor(void* object) { + AppGuardTcpConnection* _this = reinterpret_cast< AppGuardTcpConnection* >(object); + (void)_this; +} +void AppGuardTcpConnection::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardTcpConnection::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardTcpConnection& AppGuardTcpConnection::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardTcpConnection_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardTcpConnection::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpConnection) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + source_ip_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + destination_ip_.ClearNonDefaultToEmpty(); + } + } + protocol_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (cached_has_bits & 0x0000000cu) { + ::memset(&source_port_, 0, static_cast( + reinterpret_cast(&destination_port_) - + reinterpret_cast(&source_port_)) + sizeof(destination_port_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardTcpConnection::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardTcpConnection.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string source_ip = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_source_ip(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardTcpConnection.source_ip")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 source_port = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + _Internal::set_has_source_port(&has_bits); + source_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string destination_ip = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_destination_ip(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardTcpConnection.destination_ip")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 destination_port = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + _Internal::set_has_destination_port(&has_bits); + destination_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string protocol = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_protocol(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardTcpConnection.protocol")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardTcpConnection::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpConnection) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardTcpConnection.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // string source_ip = 2; + if (_internal_has_source_ip()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_source_ip().data(), static_cast(this->_internal_source_ip().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardTcpConnection.source_ip"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_source_ip(), target); + } + + // uint32 source_port = 3; + if (_internal_has_source_port()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_source_port(), target); + } + + // string destination_ip = 4; + if (_internal_has_destination_ip()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_destination_ip().data(), static_cast(this->_internal_destination_ip().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardTcpConnection.destination_ip"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_destination_ip(), target); + } + + // uint32 destination_port = 5; + if (_internal_has_destination_port()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_destination_port(), target); + } + + // string protocol = 6; + if (this->protocol().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_protocol().data(), static_cast(this->_internal_protocol().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardTcpConnection.protocol"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_protocol(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpConnection) + return target; +} + +size_t AppGuardTcpConnection::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpConnection) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // string source_ip = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_source_ip()); + } + + // string destination_ip = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_destination_ip()); + } + + } + // string protocol = 6; + if (this->protocol().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_protocol()); + } + + if (cached_has_bits & 0x0000000cu) { + // uint32 source_port = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_source_port()); + } + + // uint32 destination_port = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_destination_port()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardTcpConnection::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardTcpConnection) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardTcpConnection* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardTcpConnection) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardTcpConnection) + MergeFrom(*source); + } +} + +void AppGuardTcpConnection::MergeFrom(const AppGuardTcpConnection& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpConnection) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_source_ip(from._internal_source_ip()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_destination_ip(from._internal_destination_ip()); + } + } + if (from.protocol().size() > 0) { + _internal_set_protocol(from._internal_protocol()); + } + if (cached_has_bits & 0x0000000cu) { + if (cached_has_bits & 0x00000004u) { + source_port_ = from.source_port_; + } + if (cached_has_bits & 0x00000008u) { + destination_port_ = from.destination_port_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void AppGuardTcpConnection::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardTcpConnection) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardTcpConnection::CopyFrom(const AppGuardTcpConnection& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpConnection) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardTcpConnection::IsInitialized() const { + return true; +} + +void AppGuardTcpConnection::InternalSwap(AppGuardTcpConnection* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + source_ip_.Swap(&other->source_ip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + destination_ip_.Swap(&other->destination_ip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + protocol_.Swap(&other->protocol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AppGuardTcpConnection, destination_port_) + + sizeof(AppGuardTcpConnection::destination_port_) + - PROTOBUF_FIELD_OFFSET(AppGuardTcpConnection, source_port_)>( + reinterpret_cast(&source_port_), + reinterpret_cast(&other->source_port_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpConnection::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardIpInfo::InitAsDefaultInstance() { +} +class AppGuardIpInfo::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_country(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_asn(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_org(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_continent_code(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_city(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_region(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_postal(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_timezone(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } +}; + +AppGuardIpInfo::AppGuardIpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardIpInfo) +} +AppGuardIpInfo::AppGuardIpInfo(const AppGuardIpInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_ip().empty()) { + ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_ip(), + GetArena()); + } + country_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_country()) { + country_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_country(), + GetArena()); + } + asn_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_asn()) { + asn_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_asn(), + GetArena()); + } + org_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_org()) { + org_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_org(), + GetArena()); + } + continent_code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_continent_code()) { + continent_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_continent_code(), + GetArena()); + } + city_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_city()) { + city_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_city(), + GetArena()); + } + region_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_region()) { + region_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_region(), + GetArena()); + } + postal_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_postal()) { + postal_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_postal(), + GetArena()); + } + timezone_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_timezone()) { + timezone_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_timezone(), + GetArena()); + } + blacklist_ = from.blacklist_; + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardIpInfo) +} + +void AppGuardIpInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardIpInfo_appguard_2eproto.base); + ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + country_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + asn_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + org_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + continent_code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + city_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + region_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + postal_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + timezone_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + blacklist_ = false; +} + +AppGuardIpInfo::~AppGuardIpInfo() { + // @@protoc_insertion_point(destructor:appguard.AppGuardIpInfo) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardIpInfo::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + ip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + country_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + asn_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + org_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + continent_code_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + city_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + region_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + postal_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + timezone_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AppGuardIpInfo::ArenaDtor(void* object) { + AppGuardIpInfo* _this = reinterpret_cast< AppGuardIpInfo* >(object); + (void)_this; +} +void AppGuardIpInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardIpInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardIpInfo& AppGuardIpInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardIpInfo_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardIpInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardIpInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + country_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + asn_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + org_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + continent_code_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + city_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000020u) { + region_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000040u) { + postal_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000080u) { + timezone_.ClearNonDefaultToEmpty(); + } + } + blacklist_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardIpInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string ip = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_ip(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.ip")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string country = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_country(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.country")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string asn = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_asn(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.asn")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string org = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_org(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.org")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string continent_code = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_continent_code(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.continent_code")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string city = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_city(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.city")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string region = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + auto str = _internal_mutable_region(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.region")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string postal = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + auto str = _internal_mutable_postal(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.postal")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string timezone = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { + auto str = _internal_mutable_timezone(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardIpInfo.timezone")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool blacklist = 100; + case 100: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + blacklist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardIpInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardIpInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string ip = 1; + if (this->ip().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_ip().data(), static_cast(this->_internal_ip().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.ip"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_ip(), target); + } + + // string country = 2; + if (_internal_has_country()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_country().data(), static_cast(this->_internal_country().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.country"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_country(), target); + } + + // string asn = 3; + if (_internal_has_asn()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_asn().data(), static_cast(this->_internal_asn().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.asn"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_asn(), target); + } + + // string org = 4; + if (_internal_has_org()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_org().data(), static_cast(this->_internal_org().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.org"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_org(), target); + } + + // string continent_code = 5; + if (_internal_has_continent_code()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_continent_code().data(), static_cast(this->_internal_continent_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.continent_code"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_continent_code(), target); + } + + // string city = 6; + if (_internal_has_city()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_city().data(), static_cast(this->_internal_city().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.city"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_city(), target); + } + + // string region = 7; + if (_internal_has_region()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_region().data(), static_cast(this->_internal_region().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.region"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_region(), target); + } + + // string postal = 8; + if (_internal_has_postal()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_postal().data(), static_cast(this->_internal_postal().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.postal"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_postal(), target); + } + + // string timezone = 9; + if (_internal_has_timezone()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_timezone().data(), static_cast(this->_internal_timezone().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardIpInfo.timezone"); + target = stream->WriteStringMaybeAliased( + 9, this->_internal_timezone(), target); + } + + // bool blacklist = 100; + if (this->blacklist() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(100, this->_internal_blacklist(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardIpInfo) + return target; +} + +size_t AppGuardIpInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardIpInfo) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string ip = 1; + if (this->ip().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_ip()); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // string country = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country()); + } + + // string asn = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_asn()); + } + + // string org = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_org()); + } + + // string continent_code = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_continent_code()); + } + + // string city = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_city()); + } + + // string region = 7; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_region()); + } + + // string postal = 8; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_postal()); + } + + // string timezone = 9; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_timezone()); + } + + } + // bool blacklist = 100; + if (this->blacklist() != 0) { + total_size += 2 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardIpInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardIpInfo) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardIpInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardIpInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardIpInfo) + MergeFrom(*source); + } +} + +void AppGuardIpInfo::MergeFrom(const AppGuardIpInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardIpInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.ip().size() > 0) { + _internal_set_ip(from._internal_ip()); + } + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_country(from._internal_country()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_asn(from._internal_asn()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_org(from._internal_org()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_continent_code(from._internal_continent_code()); + } + if (cached_has_bits & 0x00000010u) { + _internal_set_city(from._internal_city()); + } + if (cached_has_bits & 0x00000020u) { + _internal_set_region(from._internal_region()); + } + if (cached_has_bits & 0x00000040u) { + _internal_set_postal(from._internal_postal()); + } + if (cached_has_bits & 0x00000080u) { + _internal_set_timezone(from._internal_timezone()); + } + } + if (from.blacklist() != 0) { + _internal_set_blacklist(from._internal_blacklist()); + } +} + +void AppGuardIpInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardIpInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardIpInfo::CopyFrom(const AppGuardIpInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardIpInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardIpInfo::IsInitialized() const { + return true; +} + +void AppGuardIpInfo::InternalSwap(AppGuardIpInfo* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ip_.Swap(&other->ip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + country_.Swap(&other->country_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + asn_.Swap(&other->asn_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + org_.Swap(&other->org_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + continent_code_.Swap(&other->continent_code_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + city_.Swap(&other->city_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + region_.Swap(&other->region_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + postal_.Swap(&other->postal_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + timezone_.Swap(&other->timezone_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(blacklist_, other->blacklist_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardIpInfo::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardTcpInfo::InitAsDefaultInstance() { + ::appguard::_AppGuardTcpInfo_default_instance_._instance.get_mutable()->connection_ = const_cast< ::appguard::AppGuardTcpConnection*>( + ::appguard::AppGuardTcpConnection::internal_default_instance()); + ::appguard::_AppGuardTcpInfo_default_instance_._instance.get_mutable()->ip_info_ = const_cast< ::appguard::AppGuardIpInfo*>( + ::appguard::AppGuardIpInfo::internal_default_instance()); +} +class AppGuardTcpInfo::_Internal { + public: + static const ::appguard::AppGuardTcpConnection& connection(const AppGuardTcpInfo* msg); + static const ::appguard::AppGuardIpInfo& ip_info(const AppGuardTcpInfo* msg); +}; + +const ::appguard::AppGuardTcpConnection& +AppGuardTcpInfo::_Internal::connection(const AppGuardTcpInfo* msg) { + return *msg->connection_; +} +const ::appguard::AppGuardIpInfo& +AppGuardTcpInfo::_Internal::ip_info(const AppGuardTcpInfo* msg) { + return *msg->ip_info_; +} +AppGuardTcpInfo::AppGuardTcpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpInfo) +} +AppGuardTcpInfo::AppGuardTcpInfo(const AppGuardTcpInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_connection()) { + connection_ = new ::appguard::AppGuardTcpConnection(*from.connection_); + } else { + connection_ = nullptr; + } + if (from._internal_has_ip_info()) { + ip_info_ = new ::appguard::AppGuardIpInfo(*from.ip_info_); + } else { + ip_info_ = nullptr; + } + tcp_id_ = from.tcp_id_; + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpInfo) +} + +void AppGuardTcpInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardTcpInfo_appguard_2eproto.base); + ::memset(&connection_, 0, static_cast( + reinterpret_cast(&tcp_id_) - + reinterpret_cast(&connection_)) + sizeof(tcp_id_)); +} + +AppGuardTcpInfo::~AppGuardTcpInfo() { + // @@protoc_insertion_point(destructor:appguard.AppGuardTcpInfo) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardTcpInfo::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (this != internal_default_instance()) delete connection_; + if (this != internal_default_instance()) delete ip_info_; +} + +void AppGuardTcpInfo::ArenaDtor(void* object) { + AppGuardTcpInfo* _this = reinterpret_cast< AppGuardTcpInfo* >(object); + (void)_this; +} +void AppGuardTcpInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardTcpInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardTcpInfo& AppGuardTcpInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardTcpInfo_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardTcpInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArena() == nullptr && connection_ != nullptr) { + delete connection_; + } + connection_ = nullptr; + if (GetArena() == nullptr && ip_info_ != nullptr) { + delete ip_info_; + } + ip_info_ = nullptr; + tcp_id_ = PROTOBUF_ULONGLONG(0); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardTcpInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .appguard.AppGuardTcpConnection connection = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_connection(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard.AppGuardIpInfo ip_info = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_ip_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 tcp_id = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + tcp_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardTcpInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .appguard.AppGuardTcpConnection connection = 1; + if (this->has_connection()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::connection(this), target, stream); + } + + // .appguard.AppGuardIpInfo ip_info = 2; + if (this->has_ip_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::ip_info(this), target, stream); + } + + // uint64 tcp_id = 3; + if (this->tcp_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->_internal_tcp_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpInfo) + return target; +} + +size_t AppGuardTcpInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpInfo) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .appguard.AppGuardTcpConnection connection = 1; + if (this->has_connection()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *connection_); + } + + // .appguard.AppGuardIpInfo ip_info = 2; + if (this->has_ip_info()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *ip_info_); + } + + // uint64 tcp_id = 3; + if (this->tcp_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_tcp_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardTcpInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardTcpInfo) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardTcpInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardTcpInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardTcpInfo) + MergeFrom(*source); + } +} + +void AppGuardTcpInfo::MergeFrom(const AppGuardTcpInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_connection()) { + _internal_mutable_connection()->::appguard::AppGuardTcpConnection::MergeFrom(from._internal_connection()); + } + if (from.has_ip_info()) { + _internal_mutable_ip_info()->::appguard::AppGuardIpInfo::MergeFrom(from._internal_ip_info()); + } + if (from.tcp_id() != 0) { + _internal_set_tcp_id(from._internal_tcp_id()); + } +} + +void AppGuardTcpInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardTcpInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardTcpInfo::CopyFrom(const AppGuardTcpInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardTcpInfo::IsInitialized() const { + return true; +} + +void AppGuardTcpInfo::InternalSwap(AppGuardTcpInfo* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AppGuardTcpInfo, tcp_id_) + + sizeof(AppGuardTcpInfo::tcp_id_) + - PROTOBUF_FIELD_OFFSET(AppGuardTcpInfo, connection_)>( + reinterpret_cast(&connection_), + reinterpret_cast(&other->connection_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpInfo::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +AppGuardHttpRequest_HeadersEntry_DoNotUse::AppGuardHttpRequest_HeadersEntry_DoNotUse() {} +AppGuardHttpRequest_HeadersEntry_DoNotUse::AppGuardHttpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void AppGuardHttpRequest_HeadersEntry_DoNotUse::MergeFrom(const AppGuardHttpRequest_HeadersEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest_HeadersEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void AppGuardHttpRequest_HeadersEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +AppGuardHttpRequest_QueryEntry_DoNotUse::AppGuardHttpRequest_QueryEntry_DoNotUse() {} +AppGuardHttpRequest_QueryEntry_DoNotUse::AppGuardHttpRequest_QueryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void AppGuardHttpRequest_QueryEntry_DoNotUse::MergeFrom(const AppGuardHttpRequest_QueryEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest_QueryEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void AppGuardHttpRequest_QueryEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void AppGuardHttpRequest::InitAsDefaultInstance() { + ::appguard::_AppGuardHttpRequest_default_instance_._instance.get_mutable()->tcp_info_ = const_cast< ::appguard::AppGuardTcpInfo*>( + ::appguard::AppGuardTcpInfo::internal_default_instance()); +} +class AppGuardHttpRequest::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardHttpRequest* msg); +}; + +const ::appguard::AppGuardTcpInfo& +AppGuardHttpRequest::_Internal::tcp_info(const AppGuardHttpRequest* msg) { + return *msg->tcp_info_; +} +AppGuardHttpRequest::AppGuardHttpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + headers_(arena), + query_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardHttpRequest) +} +AppGuardHttpRequest::AppGuardHttpRequest(const AppGuardHttpRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + headers_.MergeFrom(from.headers_); + query_.MergeFrom(from.query_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + original_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_original_url().empty()) { + original_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_original_url(), + GetArena()); + } + method_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_method().empty()) { + method_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_method(), + GetArena()); + } + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_body()) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_body(), + GetArena()); + } + if (from._internal_has_tcp_info()) { + tcp_info_ = new ::appguard::AppGuardTcpInfo(*from.tcp_info_); + } else { + tcp_info_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardHttpRequest) +} + +void AppGuardHttpRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardHttpRequest_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + original_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + method_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tcp_info_ = nullptr; +} + +AppGuardHttpRequest::~AppGuardHttpRequest() { + // @@protoc_insertion_point(destructor:appguard.AppGuardHttpRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardHttpRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + original_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + method_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete tcp_info_; +} + +void AppGuardHttpRequest::ArenaDtor(void* object) { + AppGuardHttpRequest* _this = reinterpret_cast< AppGuardHttpRequest* >(object); + (void)_this; +} +void AppGuardHttpRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardHttpRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardHttpRequest& AppGuardHttpRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardHttpRequest_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardHttpRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardHttpRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + headers_.Clear(); + query_.Clear(); + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + original_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + method_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + body_.ClearNonDefaultToEmpty(); + } + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardHttpRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardHttpRequest.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string original_url = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_original_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardHttpRequest.original_url")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map headers = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&headers_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // string method = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_method(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardHttpRequest.method")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string body = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardHttpRequest.body")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map query = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&query_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else goto handle_unusual; + continue; + // .appguard.AppGuardTcpInfo tcp_info = 100; + case 100: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardHttpRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardHttpRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // string original_url = 2; + if (this->original_url().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_original_url().data(), static_cast(this->_internal_original_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.original_url"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_original_url(), target); + } + + // map headers = 3; + if (!this->_internal_headers().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.HeadersEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.HeadersEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_headers().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_headers().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = AppGuardHttpRequest_HeadersEntry_DoNotUse::Funcs::InternalSerialize(3, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + target = AppGuardHttpRequest_HeadersEntry_DoNotUse::Funcs::InternalSerialize(3, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // string method = 4; + if (this->method().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_method().data(), static_cast(this->_internal_method().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.method"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_method(), target); + } + + // string body = 5; + if (_internal_has_body()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_body().data(), static_cast(this->_internal_body().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.body"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_body(), target); + } + + // map query = 6; + if (!this->_internal_query().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.QueryEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpRequest.QueryEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_query().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_query().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_query().begin(); + it != this->_internal_query().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = AppGuardHttpRequest_QueryEntry_DoNotUse::Funcs::InternalSerialize(6, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_query().begin(); + it != this->_internal_query().end(); ++it) { + target = AppGuardHttpRequest_QueryEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 100, _Internal::tcp_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardHttpRequest) + return target; +} + +size_t AppGuardHttpRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardHttpRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map headers = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + total_size += AppGuardHttpRequest_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // map query = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_query_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_query().begin(); + it != this->_internal_query().end(); ++it) { + total_size += AppGuardHttpRequest_QueryEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + // string original_url = 2; + if (this->original_url().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_original_url()); + } + + // string method = 4; + if (this->method().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_method()); + } + + // string body = 5; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_body()); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tcp_info_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardHttpRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardHttpRequest) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardHttpRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardHttpRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardHttpRequest) + MergeFrom(*source); + } +} + +void AppGuardHttpRequest::MergeFrom(const AppGuardHttpRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardHttpRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + headers_.MergeFrom(from.headers_); + query_.MergeFrom(from.query_); + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } + if (from.original_url().size() > 0) { + _internal_set_original_url(from._internal_original_url()); + } + if (from.method().size() > 0) { + _internal_set_method(from._internal_method()); + } + if (from._internal_has_body()) { + _internal_set_body(from._internal_body()); + } + if (from.has_tcp_info()) { + _internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom(from._internal_tcp_info()); + } +} + +void AppGuardHttpRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardHttpRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardHttpRequest::CopyFrom(const AppGuardHttpRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardHttpRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardHttpRequest::IsInitialized() const { + return true; +} + +void AppGuardHttpRequest::InternalSwap(AppGuardHttpRequest* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + headers_.Swap(&other->headers_); + query_.Swap(&other->query_); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + original_url_.Swap(&other->original_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + method_.Swap(&other->method_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + body_.Swap(&other->body_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(tcp_info_, other->tcp_info_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +AppGuardHttpResponse_HeadersEntry_DoNotUse::AppGuardHttpResponse_HeadersEntry_DoNotUse() {} +AppGuardHttpResponse_HeadersEntry_DoNotUse::AppGuardHttpResponse_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void AppGuardHttpResponse_HeadersEntry_DoNotUse::MergeFrom(const AppGuardHttpResponse_HeadersEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpResponse_HeadersEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void AppGuardHttpResponse_HeadersEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void AppGuardHttpResponse::InitAsDefaultInstance() { + ::appguard::_AppGuardHttpResponse_default_instance_._instance.get_mutable()->tcp_info_ = const_cast< ::appguard::AppGuardTcpInfo*>( + ::appguard::AppGuardTcpInfo::internal_default_instance()); +} +class AppGuardHttpResponse::_Internal { + public: + static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardHttpResponse* msg); +}; + +const ::appguard::AppGuardTcpInfo& +AppGuardHttpResponse::_Internal::tcp_info(const AppGuardHttpResponse* msg) { + return *msg->tcp_info_; +} +AppGuardHttpResponse::AppGuardHttpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + headers_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardHttpResponse) +} +AppGuardHttpResponse::AppGuardHttpResponse(const AppGuardHttpResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + headers_.MergeFrom(from.headers_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + if (from._internal_has_tcp_info()) { + tcp_info_ = new ::appguard::AppGuardTcpInfo(*from.tcp_info_); + } else { + tcp_info_ = nullptr; + } + code_ = from.code_; + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardHttpResponse) +} + +void AppGuardHttpResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardHttpResponse_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&tcp_info_, 0, static_cast( + reinterpret_cast(&code_) - + reinterpret_cast(&tcp_info_)) + sizeof(code_)); +} + +AppGuardHttpResponse::~AppGuardHttpResponse() { + // @@protoc_insertion_point(destructor:appguard.AppGuardHttpResponse) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardHttpResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete tcp_info_; +} + +void AppGuardHttpResponse::ArenaDtor(void* object) { + AppGuardHttpResponse* _this = reinterpret_cast< AppGuardHttpResponse* >(object); + (void)_this; +} +void AppGuardHttpResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardHttpResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardHttpResponse& AppGuardHttpResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardHttpResponse_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardHttpResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardHttpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + headers_.Clear(); + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; + code_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardHttpResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardHttpResponse.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 code = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map headers = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&headers_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; + // .appguard.AppGuardTcpInfo tcp_info = 100; + case 100: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardHttpResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardHttpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpResponse.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // uint32 code = 2; + if (this->code() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_code(), target); + } + + // map headers = 3; + if (!this->_internal_headers().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpResponse.HeadersEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardHttpResponse.HeadersEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_headers().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_headers().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = AppGuardHttpResponse_HeadersEntry_DoNotUse::Funcs::InternalSerialize(3, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + target = AppGuardHttpResponse_HeadersEntry_DoNotUse::Funcs::InternalSerialize(3, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 100, _Internal::tcp_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardHttpResponse) + return target; +} + +size_t AppGuardHttpResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardHttpResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map headers = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + total_size += AppGuardHttpResponse_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tcp_info_); + } + + // uint32 code = 2; + if (this->code() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_code()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardHttpResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardHttpResponse) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardHttpResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardHttpResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardHttpResponse) + MergeFrom(*source); + } +} + +void AppGuardHttpResponse::MergeFrom(const AppGuardHttpResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardHttpResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + headers_.MergeFrom(from.headers_); + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } + if (from.has_tcp_info()) { + _internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom(from._internal_tcp_info()); + } + if (from.code() != 0) { + _internal_set_code(from._internal_code()); + } +} + +void AppGuardHttpResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardHttpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardHttpResponse::CopyFrom(const AppGuardHttpResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardHttpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardHttpResponse::IsInitialized() const { + return true; +} + +void AppGuardHttpResponse::InternalSwap(AppGuardHttpResponse* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + headers_.Swap(&other->headers_); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AppGuardHttpResponse, code_) + + sizeof(AppGuardHttpResponse::code_) + - PROTOBUF_FIELD_OFFSET(AppGuardHttpResponse, tcp_info_)>( + reinterpret_cast(&tcp_info_), + reinterpret_cast(&other->tcp_info_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardHttpResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +AppGuardSmtpRequest_HeadersEntry_DoNotUse::AppGuardSmtpRequest_HeadersEntry_DoNotUse() {} +AppGuardSmtpRequest_HeadersEntry_DoNotUse::AppGuardSmtpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void AppGuardSmtpRequest_HeadersEntry_DoNotUse::MergeFrom(const AppGuardSmtpRequest_HeadersEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpRequest_HeadersEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void AppGuardSmtpRequest_HeadersEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void AppGuardSmtpRequest::InitAsDefaultInstance() { + ::appguard::_AppGuardSmtpRequest_default_instance_._instance.get_mutable()->tcp_info_ = const_cast< ::appguard::AppGuardTcpInfo*>( + ::appguard::AppGuardTcpInfo::internal_default_instance()); +} +class AppGuardSmtpRequest::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardSmtpRequest* msg); +}; + +const ::appguard::AppGuardTcpInfo& +AppGuardSmtpRequest::_Internal::tcp_info(const AppGuardSmtpRequest* msg) { + return *msg->tcp_info_; +} +AppGuardSmtpRequest::AppGuardSmtpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + headers_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardSmtpRequest) +} +AppGuardSmtpRequest::AppGuardSmtpRequest(const AppGuardSmtpRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + headers_.MergeFrom(from.headers_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_body()) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_body(), + GetArena()); + } + if (from._internal_has_tcp_info()) { + tcp_info_ = new ::appguard::AppGuardTcpInfo(*from.tcp_info_); + } else { + tcp_info_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardSmtpRequest) +} + +void AppGuardSmtpRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardSmtpRequest_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tcp_info_ = nullptr; +} + +AppGuardSmtpRequest::~AppGuardSmtpRequest() { + // @@protoc_insertion_point(destructor:appguard.AppGuardSmtpRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardSmtpRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete tcp_info_; +} + +void AppGuardSmtpRequest::ArenaDtor(void* object) { + AppGuardSmtpRequest* _this = reinterpret_cast< AppGuardSmtpRequest* >(object); + (void)_this; +} +void AppGuardSmtpRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardSmtpRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardSmtpRequest& AppGuardSmtpRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardSmtpRequest_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardSmtpRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardSmtpRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + headers_.Clear(); + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + body_.ClearNonDefaultToEmpty(); + } + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardSmtpRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardSmtpRequest.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map headers = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&headers_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; + // string body = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardSmtpRequest.body")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard.AppGuardTcpInfo tcp_info = 100; + case 100: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardSmtpRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardSmtpRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardSmtpRequest.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // map headers = 2; + if (!this->_internal_headers().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardSmtpRequest.HeadersEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardSmtpRequest.HeadersEntry.value"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_headers().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_headers().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = AppGuardSmtpRequest_HeadersEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + target = AppGuardSmtpRequest_HeadersEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + // string body = 3; + if (_internal_has_body()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_body().data(), static_cast(this->_internal_body().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardSmtpRequest.body"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_body(), target); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 100, _Internal::tcp_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardSmtpRequest) + return target; +} + +size_t AppGuardSmtpRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardSmtpRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map headers = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_headers().begin(); + it != this->_internal_headers().end(); ++it) { + total_size += AppGuardSmtpRequest_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + // string body = 3; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_body()); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tcp_info_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardSmtpRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardSmtpRequest) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardSmtpRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardSmtpRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardSmtpRequest) + MergeFrom(*source); + } +} + +void AppGuardSmtpRequest::MergeFrom(const AppGuardSmtpRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardSmtpRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + headers_.MergeFrom(from.headers_); + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } + if (from._internal_has_body()) { + _internal_set_body(from._internal_body()); + } + if (from.has_tcp_info()) { + _internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom(from._internal_tcp_info()); + } +} + +void AppGuardSmtpRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardSmtpRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardSmtpRequest::CopyFrom(const AppGuardSmtpRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardSmtpRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardSmtpRequest::IsInitialized() const { + return true; +} + +void AppGuardSmtpRequest::InternalSwap(AppGuardSmtpRequest* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + headers_.Swap(&other->headers_); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + body_.Swap(&other->body_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(tcp_info_, other->tcp_info_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardSmtpResponse::InitAsDefaultInstance() { + ::appguard::_AppGuardSmtpResponse_default_instance_._instance.get_mutable()->tcp_info_ = const_cast< ::appguard::AppGuardTcpInfo*>( + ::appguard::AppGuardTcpInfo::internal_default_instance()); +} +class AppGuardSmtpResponse::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_code(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardSmtpResponse* msg); +}; + +const ::appguard::AppGuardTcpInfo& +AppGuardSmtpResponse::_Internal::tcp_info(const AppGuardSmtpResponse* msg) { + return *msg->tcp_info_; +} +AppGuardSmtpResponse::AppGuardSmtpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardSmtpResponse) +} +AppGuardSmtpResponse::AppGuardSmtpResponse(const AppGuardSmtpResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + if (from._internal_has_tcp_info()) { + tcp_info_ = new ::appguard::AppGuardTcpInfo(*from.tcp_info_); + } else { + tcp_info_ = nullptr; + } + code_ = from.code_; + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardSmtpResponse) +} + +void AppGuardSmtpResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardSmtpResponse_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&tcp_info_, 0, static_cast( + reinterpret_cast(&code_) - + reinterpret_cast(&tcp_info_)) + sizeof(code_)); +} + +AppGuardSmtpResponse::~AppGuardSmtpResponse() { + // @@protoc_insertion_point(destructor:appguard.AppGuardSmtpResponse) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardSmtpResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete tcp_info_; +} + +void AppGuardSmtpResponse::ArenaDtor(void* object) { + AppGuardSmtpResponse* _this = reinterpret_cast< AppGuardSmtpResponse* >(object); + (void)_this; +} +void AppGuardSmtpResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardSmtpResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardSmtpResponse& AppGuardSmtpResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardSmtpResponse_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardSmtpResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardSmtpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; + code_ = 0u; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardSmtpResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.AppGuardSmtpResponse.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint32 code = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + _Internal::set_has_code(&has_bits); + code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard.AppGuardTcpInfo tcp_info = 100; + case 100: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardSmtpResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardSmtpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.AppGuardSmtpResponse.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + // uint32 code = 2; + if (_internal_has_code()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_code(), target); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 100, _Internal::tcp_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardSmtpResponse) + return target; +} + +size_t AppGuardSmtpResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardSmtpResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + // .appguard.AppGuardTcpInfo tcp_info = 100; + if (this->has_tcp_info()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tcp_info_); + } + + // uint32 code = 2; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_code()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardSmtpResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardSmtpResponse) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardSmtpResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardSmtpResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardSmtpResponse) + MergeFrom(*source); + } +} + +void AppGuardSmtpResponse::MergeFrom(const AppGuardSmtpResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardSmtpResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } + if (from.has_tcp_info()) { + _internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom(from._internal_tcp_info()); + } + if (from._internal_has_code()) { + _internal_set_code(from._internal_code()); + } +} + +void AppGuardSmtpResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardSmtpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardSmtpResponse::CopyFrom(const AppGuardSmtpResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardSmtpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardSmtpResponse::IsInitialized() const { + return true; +} + +void AppGuardSmtpResponse::InternalSwap(AppGuardSmtpResponse* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(AppGuardSmtpResponse, code_) + + sizeof(AppGuardSmtpResponse::code_) + - PROTOBUF_FIELD_OFFSET(AppGuardSmtpResponse, tcp_info_)>( + reinterpret_cast(&tcp_info_), + reinterpret_cast(&other->tcp_info_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardSmtpResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardResponse::InitAsDefaultInstance() { +} +class AppGuardResponse::_Internal { + public: +}; + +AppGuardResponse::AppGuardResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardResponse) +} +AppGuardResponse::AppGuardResponse(const AppGuardResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + policy_ = from.policy_; + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardResponse) +} + +void AppGuardResponse::SharedCtor() { + policy_ = 0; +} + +AppGuardResponse::~AppGuardResponse() { + // @@protoc_insertion_point(destructor:appguard.AppGuardResponse) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void AppGuardResponse::ArenaDtor(void* object) { + AppGuardResponse* _this = reinterpret_cast< AppGuardResponse* >(object); + (void)_this; +} +void AppGuardResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardResponse& AppGuardResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardResponse_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + policy_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .appguard_commands.FirewallPolicy policy = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_policy(static_cast<::appguard_commands::FirewallPolicy>(val)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .appguard_commands.FirewallPolicy policy = 2; + if (this->policy() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_policy(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardResponse) + return target; +} + +size_t AppGuardResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .appguard_commands.FirewallPolicy policy = 2; + if (this->policy() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_policy()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardResponse) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardResponse) + MergeFrom(*source); + } +} + +void AppGuardResponse::MergeFrom(const AppGuardResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.policy() != 0) { + _internal_set_policy(from._internal_policy()); + } +} + +void AppGuardResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardResponse::CopyFrom(const AppGuardResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardResponse::IsInitialized() const { + return true; +} + +void AppGuardResponse::InternalSwap(AppGuardResponse* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(policy_, other->policy_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AppGuardTcpResponse::InitAsDefaultInstance() { + ::appguard::_AppGuardTcpResponse_default_instance_._instance.get_mutable()->tcp_info_ = const_cast< ::appguard::AppGuardTcpInfo*>( + ::appguard::AppGuardTcpInfo::internal_default_instance()); +} +class AppGuardTcpResponse::_Internal { + public: + static const ::appguard::AppGuardTcpInfo& tcp_info(const AppGuardTcpResponse* msg); +}; + +const ::appguard::AppGuardTcpInfo& +AppGuardTcpResponse::_Internal::tcp_info(const AppGuardTcpResponse* msg) { + return *msg->tcp_info_; +} +AppGuardTcpResponse::AppGuardTcpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.AppGuardTcpResponse) +} +AppGuardTcpResponse::AppGuardTcpResponse(const AppGuardTcpResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_tcp_info()) { + tcp_info_ = new ::appguard::AppGuardTcpInfo(*from.tcp_info_); + } else { + tcp_info_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:appguard.AppGuardTcpResponse) +} + +void AppGuardTcpResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AppGuardTcpResponse_appguard_2eproto.base); + tcp_info_ = nullptr; +} + +AppGuardTcpResponse::~AppGuardTcpResponse() { + // @@protoc_insertion_point(destructor:appguard.AppGuardTcpResponse) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AppGuardTcpResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (this != internal_default_instance()) delete tcp_info_; +} + +void AppGuardTcpResponse::ArenaDtor(void* object) { + AppGuardTcpResponse* _this = reinterpret_cast< AppGuardTcpResponse* >(object); + (void)_this; +} +void AppGuardTcpResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AppGuardTcpResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AppGuardTcpResponse& AppGuardTcpResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AppGuardTcpResponse_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void AppGuardTcpResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.AppGuardTcpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AppGuardTcpResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .appguard.AppGuardTcpInfo tcp_info = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_tcp_info(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AppGuardTcpResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.AppGuardTcpResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .appguard.AppGuardTcpInfo tcp_info = 1; + if (this->has_tcp_info()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::tcp_info(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.AppGuardTcpResponse) + return target; +} + +size_t AppGuardTcpResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.AppGuardTcpResponse) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .appguard.AppGuardTcpInfo tcp_info = 1; + if (this->has_tcp_info()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tcp_info_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AppGuardTcpResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.AppGuardTcpResponse) + GOOGLE_DCHECK_NE(&from, this); + const AppGuardTcpResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.AppGuardTcpResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.AppGuardTcpResponse) + MergeFrom(*source); + } +} + +void AppGuardTcpResponse::MergeFrom(const AppGuardTcpResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.AppGuardTcpResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_tcp_info()) { + _internal_mutable_tcp_info()->::appguard::AppGuardTcpInfo::MergeFrom(from._internal_tcp_info()); + } +} + +void AppGuardTcpResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.AppGuardTcpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AppGuardTcpResponse::CopyFrom(const AppGuardTcpResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.AppGuardTcpResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AppGuardTcpResponse::IsInitialized() const { + return true; +} + +void AppGuardTcpResponse::InternalSwap(AppGuardTcpResponse* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(tcp_info_, other->tcp_info_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AppGuardTcpResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Token::InitAsDefaultInstance() { +} +class Token::_Internal { + public: +}; + +Token::Token(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard.Token) +} +Token::Token(const Token& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_token().empty()) { + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_token(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard.Token) +} + +void Token::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Token_appguard_2eproto.base); + token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Token::~Token() { + // @@protoc_insertion_point(destructor:appguard.Token) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Token::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Token::ArenaDtor(void* object) { + Token* _this = reinterpret_cast< Token* >(object); + (void)_this; +} +void Token::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Token::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Token& Token::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Token_appguard_2eproto.base); + return *internal_default_instance(); +} + + +void Token::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard.Token) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Token::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string token = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard.Token.token")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Token::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard.Token) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_token().data(), static_cast(this->_internal_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard.Token.token"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard.Token) + return target; +} + +size_t Token::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard.Token) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string token = 1; + if (this->token().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_token()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Token::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard.Token) + GOOGLE_DCHECK_NE(&from, this); + const Token* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard.Token) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard.Token) + MergeFrom(*source); + } +} + +void Token::MergeFrom(const Token& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard.Token) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.token().size() > 0) { + _internal_set_token(from._internal_token()); + } +} + +void Token::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard.Token) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Token::CopyFrom(const Token& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard.Token) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Token::IsInitialized() const { + return true; +} + +void Token::InternalSwap(Token* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + token_.Swap(&other->token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Token::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace appguard +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::appguard::Logs* Arena::CreateMaybeMessage< ::appguard::Logs >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::Logs >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::Log* Arena::CreateMaybeMessage< ::appguard::Log >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::Log >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpConnection* Arena::CreateMaybeMessage< ::appguard::AppGuardTcpConnection >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardTcpConnection >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardIpInfo* Arena::CreateMaybeMessage< ::appguard::AppGuardIpInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardIpInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpInfo* Arena::CreateMaybeMessage< ::appguard::AppGuardTcpInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardTcpInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse* Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpRequest* Arena::CreateMaybeMessage< ::appguard::AppGuardHttpRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardHttpRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage< ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardHttpResponse* Arena::CreateMaybeMessage< ::appguard::AppGuardHttpResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardHttpResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpRequest* Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardSmtpResponse* Arena::CreateMaybeMessage< ::appguard::AppGuardSmtpResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardSmtpResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardResponse* Arena::CreateMaybeMessage< ::appguard::AppGuardResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::AppGuardTcpResponse* Arena::CreateMaybeMessage< ::appguard::AppGuardTcpResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::AppGuardTcpResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard::Token* Arena::CreateMaybeMessage< ::appguard::Token >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard::Token >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/generated/appguard.pb.h b/src/generated/appguard.pb.h new file mode 100644 index 0000000..d169231 --- /dev/null +++ b/src/generated/appguard.pb.h @@ -0,0 +1,6123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: appguard.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3012000 +#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 3012004 < 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 +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "commands.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_appguard_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_appguard_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[16] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_appguard_2eproto; +namespace appguard { +class AppGuardHttpRequest; +class AppGuardHttpRequestDefaultTypeInternal; +extern AppGuardHttpRequestDefaultTypeInternal _AppGuardHttpRequest_default_instance_; +class AppGuardHttpRequest_HeadersEntry_DoNotUse; +class AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal; +extern AppGuardHttpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_; +class AppGuardHttpRequest_QueryEntry_DoNotUse; +class AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal; +extern AppGuardHttpRequest_QueryEntry_DoNotUseDefaultTypeInternal _AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_; +class AppGuardHttpResponse; +class AppGuardHttpResponseDefaultTypeInternal; +extern AppGuardHttpResponseDefaultTypeInternal _AppGuardHttpResponse_default_instance_; +class AppGuardHttpResponse_HeadersEntry_DoNotUse; +class AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal; +extern AppGuardHttpResponse_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_; +class AppGuardIpInfo; +class AppGuardIpInfoDefaultTypeInternal; +extern AppGuardIpInfoDefaultTypeInternal _AppGuardIpInfo_default_instance_; +class AppGuardResponse; +class AppGuardResponseDefaultTypeInternal; +extern AppGuardResponseDefaultTypeInternal _AppGuardResponse_default_instance_; +class AppGuardSmtpRequest; +class AppGuardSmtpRequestDefaultTypeInternal; +extern AppGuardSmtpRequestDefaultTypeInternal _AppGuardSmtpRequest_default_instance_; +class AppGuardSmtpRequest_HeadersEntry_DoNotUse; +class AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal; +extern AppGuardSmtpRequest_HeadersEntry_DoNotUseDefaultTypeInternal _AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_; +class AppGuardSmtpResponse; +class AppGuardSmtpResponseDefaultTypeInternal; +extern AppGuardSmtpResponseDefaultTypeInternal _AppGuardSmtpResponse_default_instance_; +class AppGuardTcpConnection; +class AppGuardTcpConnectionDefaultTypeInternal; +extern AppGuardTcpConnectionDefaultTypeInternal _AppGuardTcpConnection_default_instance_; +class AppGuardTcpInfo; +class AppGuardTcpInfoDefaultTypeInternal; +extern AppGuardTcpInfoDefaultTypeInternal _AppGuardTcpInfo_default_instance_; +class AppGuardTcpResponse; +class AppGuardTcpResponseDefaultTypeInternal; +extern AppGuardTcpResponseDefaultTypeInternal _AppGuardTcpResponse_default_instance_; +class Log; +class LogDefaultTypeInternal; +extern LogDefaultTypeInternal _Log_default_instance_; +class Logs; +class LogsDefaultTypeInternal; +extern LogsDefaultTypeInternal _Logs_default_instance_; +class Token; +class TokenDefaultTypeInternal; +extern TokenDefaultTypeInternal _Token_default_instance_; +} // namespace appguard +PROTOBUF_NAMESPACE_OPEN +template<> ::appguard::AppGuardHttpRequest* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest>(Arena*); +template<> ::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest_HeadersEntry_DoNotUse>(Arena*); +template<> ::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpRequest_QueryEntry_DoNotUse>(Arena*); +template<> ::appguard::AppGuardHttpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpResponse>(Arena*); +template<> ::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardHttpResponse_HeadersEntry_DoNotUse>(Arena*); +template<> ::appguard::AppGuardIpInfo* Arena::CreateMaybeMessage<::appguard::AppGuardIpInfo>(Arena*); +template<> ::appguard::AppGuardResponse* Arena::CreateMaybeMessage<::appguard::AppGuardResponse>(Arena*); +template<> ::appguard::AppGuardSmtpRequest* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpRequest>(Arena*); +template<> ::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpRequest_HeadersEntry_DoNotUse>(Arena*); +template<> ::appguard::AppGuardSmtpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardSmtpResponse>(Arena*); +template<> ::appguard::AppGuardTcpConnection* Arena::CreateMaybeMessage<::appguard::AppGuardTcpConnection>(Arena*); +template<> ::appguard::AppGuardTcpInfo* Arena::CreateMaybeMessage<::appguard::AppGuardTcpInfo>(Arena*); +template<> ::appguard::AppGuardTcpResponse* Arena::CreateMaybeMessage<::appguard::AppGuardTcpResponse>(Arena*); +template<> ::appguard::Log* Arena::CreateMaybeMessage<::appguard::Log>(Arena*); +template<> ::appguard::Logs* Arena::CreateMaybeMessage<::appguard::Logs>(Arena*); +template<> ::appguard::Token* Arena::CreateMaybeMessage<::appguard::Token>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace appguard { + +// =================================================================== + +class Logs PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.Logs) */ { + public: + inline Logs() : Logs(nullptr) {}; + virtual ~Logs(); + + Logs(const Logs& from); + Logs(Logs&& from) noexcept + : Logs() { + *this = ::std::move(from); + } + + inline Logs& operator=(const Logs& from) { + CopyFrom(from); + return *this; + } + inline Logs& operator=(Logs&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Logs& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Logs* internal_default_instance() { + return reinterpret_cast( + &_Logs_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Logs& a, Logs& b) { + a.Swap(&b); + } + inline void Swap(Logs* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Logs* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Logs* New() const final { + return CreateMaybeMessage(nullptr); + } + + Logs* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Logs& from); + void MergeFrom(const Logs& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Logs* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.Logs"; + } + protected: + explicit Logs(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLogsFieldNumber = 3, + kTokenFieldNumber = 1, + }; + // repeated .appguard.Log logs = 3; + int logs_size() const; + private: + int _internal_logs_size() const; + public: + void clear_logs(); + ::appguard::Log* mutable_logs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::appguard::Log >* + mutable_logs(); + private: + const ::appguard::Log& _internal_logs(int index) const; + ::appguard::Log* _internal_add_logs(); + public: + const ::appguard::Log& logs(int index) const; + ::appguard::Log* add_logs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::appguard::Log >& + logs() const; + + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // @@protoc_insertion_point(class_scope:appguard.Logs) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::appguard::Log > logs_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class Log PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.Log) */ { + public: + inline Log() : Log(nullptr) {}; + virtual ~Log(); + + Log(const Log& from); + Log(Log&& from) noexcept + : Log() { + *this = ::std::move(from); + } + + inline Log& operator=(const Log& from) { + CopyFrom(from); + return *this; + } + inline Log& operator=(Log&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Log& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Log* internal_default_instance() { + return reinterpret_cast( + &_Log_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Log& a, Log& b) { + a.Swap(&b); + } + inline void Swap(Log* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Log* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Log* New() const final { + return CreateMaybeMessage(nullptr); + } + + Log* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Log& from); + void MergeFrom(const Log& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Log* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.Log"; + } + protected: + explicit Log(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTimestampFieldNumber = 1, + kLevelFieldNumber = 2, + kMessageFieldNumber = 3, + }; + // string timestamp = 1; + void clear_timestamp(); + const std::string& timestamp() const; + void set_timestamp(const std::string& value); + void set_timestamp(std::string&& value); + void set_timestamp(const char* value); + void set_timestamp(const char* value, size_t size); + std::string* mutable_timestamp(); + std::string* release_timestamp(); + void set_allocated_timestamp(std::string* timestamp); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_timestamp(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_timestamp( + std::string* timestamp); + private: + const std::string& _internal_timestamp() const; + void _internal_set_timestamp(const std::string& value); + std::string* _internal_mutable_timestamp(); + public: + + // string level = 2; + void clear_level(); + const std::string& level() const; + void set_level(const std::string& value); + void set_level(std::string&& value); + void set_level(const char* value); + void set_level(const char* value, size_t size); + std::string* mutable_level(); + std::string* release_level(); + void set_allocated_level(std::string* level); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_level(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_level( + std::string* level); + private: + const std::string& _internal_level() const; + void _internal_set_level(const std::string& value); + std::string* _internal_mutable_level(); + public: + + // string message = 3; + void clear_message(); + const std::string& message() const; + void set_message(const std::string& value); + void set_message(std::string&& value); + 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); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_message(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_message( + std::string* message); + private: + const std::string& _internal_message() const; + void _internal_set_message(const std::string& value); + std::string* _internal_mutable_message(); + public: + + // @@protoc_insertion_point(class_scope:appguard.Log) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr timestamp_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr level_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardTcpConnection PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpConnection) */ { + public: + inline AppGuardTcpConnection() : AppGuardTcpConnection(nullptr) {}; + virtual ~AppGuardTcpConnection(); + + AppGuardTcpConnection(const AppGuardTcpConnection& from); + AppGuardTcpConnection(AppGuardTcpConnection&& from) noexcept + : AppGuardTcpConnection() { + *this = ::std::move(from); + } + + inline AppGuardTcpConnection& operator=(const AppGuardTcpConnection& from) { + CopyFrom(from); + return *this; + } + inline AppGuardTcpConnection& operator=(AppGuardTcpConnection&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardTcpConnection& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardTcpConnection* internal_default_instance() { + return reinterpret_cast( + &_AppGuardTcpConnection_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(AppGuardTcpConnection& a, AppGuardTcpConnection& b) { + a.Swap(&b); + } + inline void Swap(AppGuardTcpConnection* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardTcpConnection* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardTcpConnection* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardTcpConnection* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardTcpConnection& from); + void MergeFrom(const AppGuardTcpConnection& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardTcpConnection* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardTcpConnection"; + } + protected: + explicit AppGuardTcpConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTokenFieldNumber = 1, + kSourceIpFieldNumber = 2, + kDestinationIpFieldNumber = 4, + kProtocolFieldNumber = 6, + kSourcePortFieldNumber = 3, + kDestinationPortFieldNumber = 5, + }; + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // string source_ip = 2; + bool has_source_ip() const; + private: + bool _internal_has_source_ip() const; + public: + void clear_source_ip(); + const std::string& source_ip() const; + void set_source_ip(const std::string& value); + void set_source_ip(std::string&& value); + void set_source_ip(const char* value); + void set_source_ip(const char* value, size_t size); + std::string* mutable_source_ip(); + std::string* release_source_ip(); + void set_allocated_source_ip(std::string* source_ip); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_source_ip(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_source_ip( + std::string* source_ip); + private: + const std::string& _internal_source_ip() const; + void _internal_set_source_ip(const std::string& value); + std::string* _internal_mutable_source_ip(); + public: + + // string destination_ip = 4; + bool has_destination_ip() const; + private: + bool _internal_has_destination_ip() const; + public: + void clear_destination_ip(); + const std::string& destination_ip() const; + void set_destination_ip(const std::string& value); + void set_destination_ip(std::string&& value); + void set_destination_ip(const char* value); + void set_destination_ip(const char* value, size_t size); + std::string* mutable_destination_ip(); + std::string* release_destination_ip(); + void set_allocated_destination_ip(std::string* destination_ip); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_destination_ip(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_destination_ip( + std::string* destination_ip); + private: + const std::string& _internal_destination_ip() const; + void _internal_set_destination_ip(const std::string& value); + std::string* _internal_mutable_destination_ip(); + public: + + // string protocol = 6; + void clear_protocol(); + const std::string& protocol() const; + void set_protocol(const std::string& value); + void set_protocol(std::string&& value); + void set_protocol(const char* value); + void set_protocol(const char* value, size_t size); + std::string* mutable_protocol(); + std::string* release_protocol(); + void set_allocated_protocol(std::string* protocol); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_protocol(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_protocol( + std::string* protocol); + private: + const std::string& _internal_protocol() const; + void _internal_set_protocol(const std::string& value); + std::string* _internal_mutable_protocol(); + public: + + // uint32 source_port = 3; + bool has_source_port() const; + private: + bool _internal_has_source_port() const; + public: + void clear_source_port(); + ::PROTOBUF_NAMESPACE_ID::uint32 source_port() const; + void set_source_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_source_port() const; + void _internal_set_source_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // uint32 destination_port = 5; + bool has_destination_port() const; + private: + bool _internal_has_destination_port() const; + public: + void clear_destination_port(); + ::PROTOBUF_NAMESPACE_ID::uint32 destination_port() const; + void set_destination_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_destination_port() const; + void _internal_set_destination_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpConnection) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_ip_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr destination_ip_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr protocol_; + ::PROTOBUF_NAMESPACE_ID::uint32 source_port_; + ::PROTOBUF_NAMESPACE_ID::uint32 destination_port_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardIpInfo PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardIpInfo) */ { + public: + inline AppGuardIpInfo() : AppGuardIpInfo(nullptr) {}; + virtual ~AppGuardIpInfo(); + + AppGuardIpInfo(const AppGuardIpInfo& from); + AppGuardIpInfo(AppGuardIpInfo&& from) noexcept + : AppGuardIpInfo() { + *this = ::std::move(from); + } + + inline AppGuardIpInfo& operator=(const AppGuardIpInfo& from) { + CopyFrom(from); + return *this; + } + inline AppGuardIpInfo& operator=(AppGuardIpInfo&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardIpInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardIpInfo* internal_default_instance() { + return reinterpret_cast( + &_AppGuardIpInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(AppGuardIpInfo& a, AppGuardIpInfo& b) { + a.Swap(&b); + } + inline void Swap(AppGuardIpInfo* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardIpInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardIpInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardIpInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardIpInfo& from); + void MergeFrom(const AppGuardIpInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardIpInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardIpInfo"; + } + protected: + explicit AppGuardIpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIpFieldNumber = 1, + kCountryFieldNumber = 2, + kAsnFieldNumber = 3, + kOrgFieldNumber = 4, + kContinentCodeFieldNumber = 5, + kCityFieldNumber = 6, + kRegionFieldNumber = 7, + kPostalFieldNumber = 8, + kTimezoneFieldNumber = 9, + kBlacklistFieldNumber = 100, + }; + // string ip = 1; + void clear_ip(); + const std::string& ip() const; + void set_ip(const std::string& value); + void set_ip(std::string&& value); + void set_ip(const char* value); + void set_ip(const char* value, size_t size); + std::string* mutable_ip(); + std::string* release_ip(); + void set_allocated_ip(std::string* ip); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_ip(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_ip( + std::string* ip); + private: + const std::string& _internal_ip() const; + void _internal_set_ip(const std::string& value); + std::string* _internal_mutable_ip(); + public: + + // string country = 2; + bool has_country() const; + private: + bool _internal_has_country() const; + public: + void clear_country(); + const std::string& country() const; + void set_country(const std::string& value); + void set_country(std::string&& value); + void set_country(const char* value); + void set_country(const char* value, size_t size); + std::string* mutable_country(); + std::string* release_country(); + void set_allocated_country(std::string* country); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_country(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_country( + std::string* country); + private: + const std::string& _internal_country() const; + void _internal_set_country(const std::string& value); + std::string* _internal_mutable_country(); + public: + + // string asn = 3; + bool has_asn() const; + private: + bool _internal_has_asn() const; + public: + void clear_asn(); + const std::string& asn() const; + void set_asn(const std::string& value); + void set_asn(std::string&& value); + void set_asn(const char* value); + void set_asn(const char* value, size_t size); + std::string* mutable_asn(); + std::string* release_asn(); + void set_allocated_asn(std::string* asn); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_asn(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_asn( + std::string* asn); + private: + const std::string& _internal_asn() const; + void _internal_set_asn(const std::string& value); + std::string* _internal_mutable_asn(); + public: + + // string org = 4; + bool has_org() const; + private: + bool _internal_has_org() const; + public: + void clear_org(); + const std::string& org() const; + void set_org(const std::string& value); + void set_org(std::string&& value); + void set_org(const char* value); + void set_org(const char* value, size_t size); + std::string* mutable_org(); + std::string* release_org(); + void set_allocated_org(std::string* org); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_org(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_org( + std::string* org); + private: + const std::string& _internal_org() const; + void _internal_set_org(const std::string& value); + std::string* _internal_mutable_org(); + public: + + // string continent_code = 5; + bool has_continent_code() const; + private: + bool _internal_has_continent_code() const; + public: + void clear_continent_code(); + const std::string& continent_code() const; + void set_continent_code(const std::string& value); + void set_continent_code(std::string&& value); + void set_continent_code(const char* value); + void set_continent_code(const char* value, size_t size); + std::string* mutable_continent_code(); + std::string* release_continent_code(); + void set_allocated_continent_code(std::string* continent_code); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_continent_code(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_continent_code( + std::string* continent_code); + private: + const std::string& _internal_continent_code() const; + void _internal_set_continent_code(const std::string& value); + std::string* _internal_mutable_continent_code(); + public: + + // string city = 6; + bool has_city() const; + private: + bool _internal_has_city() const; + public: + void clear_city(); + const std::string& city() const; + void set_city(const std::string& value); + void set_city(std::string&& value); + void set_city(const char* value); + void set_city(const char* value, size_t size); + std::string* mutable_city(); + std::string* release_city(); + void set_allocated_city(std::string* city); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_city(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_city( + std::string* city); + private: + const std::string& _internal_city() const; + void _internal_set_city(const std::string& value); + std::string* _internal_mutable_city(); + public: + + // string region = 7; + bool has_region() const; + private: + bool _internal_has_region() const; + public: + void clear_region(); + const std::string& region() const; + void set_region(const std::string& value); + void set_region(std::string&& value); + void set_region(const char* value); + void set_region(const char* value, size_t size); + std::string* mutable_region(); + std::string* release_region(); + void set_allocated_region(std::string* region); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_region(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_region( + std::string* region); + private: + const std::string& _internal_region() const; + void _internal_set_region(const std::string& value); + std::string* _internal_mutable_region(); + public: + + // string postal = 8; + bool has_postal() const; + private: + bool _internal_has_postal() const; + public: + void clear_postal(); + const std::string& postal() const; + void set_postal(const std::string& value); + void set_postal(std::string&& value); + void set_postal(const char* value); + void set_postal(const char* value, size_t size); + std::string* mutable_postal(); + std::string* release_postal(); + void set_allocated_postal(std::string* postal); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_postal(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_postal( + std::string* postal); + private: + const std::string& _internal_postal() const; + void _internal_set_postal(const std::string& value); + std::string* _internal_mutable_postal(); + public: + + // string timezone = 9; + bool has_timezone() const; + private: + bool _internal_has_timezone() const; + public: + void clear_timezone(); + const std::string& timezone() const; + void set_timezone(const std::string& value); + void set_timezone(std::string&& value); + void set_timezone(const char* value); + void set_timezone(const char* value, size_t size); + std::string* mutable_timezone(); + std::string* release_timezone(); + void set_allocated_timezone(std::string* timezone); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_timezone(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_timezone( + std::string* timezone); + private: + const std::string& _internal_timezone() const; + void _internal_set_timezone(const std::string& value); + std::string* _internal_mutable_timezone(); + public: + + // bool blacklist = 100; + void clear_blacklist(); + bool blacklist() const; + void set_blacklist(bool value); + private: + bool _internal_blacklist() const; + void _internal_set_blacklist(bool value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardIpInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ip_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr asn_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr org_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr continent_code_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr city_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr postal_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr timezone_; + bool blacklist_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardTcpInfo PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpInfo) */ { + public: + inline AppGuardTcpInfo() : AppGuardTcpInfo(nullptr) {}; + virtual ~AppGuardTcpInfo(); + + AppGuardTcpInfo(const AppGuardTcpInfo& from); + AppGuardTcpInfo(AppGuardTcpInfo&& from) noexcept + : AppGuardTcpInfo() { + *this = ::std::move(from); + } + + inline AppGuardTcpInfo& operator=(const AppGuardTcpInfo& from) { + CopyFrom(from); + return *this; + } + inline AppGuardTcpInfo& operator=(AppGuardTcpInfo&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardTcpInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardTcpInfo* internal_default_instance() { + return reinterpret_cast( + &_AppGuardTcpInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(AppGuardTcpInfo& a, AppGuardTcpInfo& b) { + a.Swap(&b); + } + inline void Swap(AppGuardTcpInfo* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardTcpInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardTcpInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardTcpInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardTcpInfo& from); + void MergeFrom(const AppGuardTcpInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardTcpInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardTcpInfo"; + } + protected: + explicit AppGuardTcpInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConnectionFieldNumber = 1, + kIpInfoFieldNumber = 2, + kTcpIdFieldNumber = 3, + }; + // .appguard.AppGuardTcpConnection connection = 1; + bool has_connection() const; + private: + bool _internal_has_connection() const; + public: + void clear_connection(); + const ::appguard::AppGuardTcpConnection& connection() const; + ::appguard::AppGuardTcpConnection* release_connection(); + ::appguard::AppGuardTcpConnection* mutable_connection(); + void set_allocated_connection(::appguard::AppGuardTcpConnection* connection); + private: + const ::appguard::AppGuardTcpConnection& _internal_connection() const; + ::appguard::AppGuardTcpConnection* _internal_mutable_connection(); + public: + void unsafe_arena_set_allocated_connection( + ::appguard::AppGuardTcpConnection* connection); + ::appguard::AppGuardTcpConnection* unsafe_arena_release_connection(); + + // .appguard.AppGuardIpInfo ip_info = 2; + bool has_ip_info() const; + private: + bool _internal_has_ip_info() const; + public: + void clear_ip_info(); + const ::appguard::AppGuardIpInfo& ip_info() const; + ::appguard::AppGuardIpInfo* release_ip_info(); + ::appguard::AppGuardIpInfo* mutable_ip_info(); + void set_allocated_ip_info(::appguard::AppGuardIpInfo* ip_info); + private: + const ::appguard::AppGuardIpInfo& _internal_ip_info() const; + ::appguard::AppGuardIpInfo* _internal_mutable_ip_info(); + public: + void unsafe_arena_set_allocated_ip_info( + ::appguard::AppGuardIpInfo* ip_info); + ::appguard::AppGuardIpInfo* unsafe_arena_release_ip_info(); + + // uint64 tcp_id = 3; + void clear_tcp_id(); + ::PROTOBUF_NAMESPACE_ID::uint64 tcp_id() const; + void set_tcp_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_tcp_id() const; + void _internal_set_tcp_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::appguard::AppGuardTcpConnection* connection_; + ::appguard::AppGuardIpInfo* ip_info_; + ::PROTOBUF_NAMESPACE_ID::uint64 tcp_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardHttpRequest_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AppGuardHttpRequest_HeadersEntry_DoNotUse(); + AppGuardHttpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AppGuardHttpRequest_HeadersEntry_DoNotUse& other); + static const AppGuardHttpRequest_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpRequest_HeadersEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.HeadersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.HeadersEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[5]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class AppGuardHttpRequest_QueryEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AppGuardHttpRequest_QueryEntry_DoNotUse(); + AppGuardHttpRequest_QueryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AppGuardHttpRequest_QueryEntry_DoNotUse& other); + static const AppGuardHttpRequest_QueryEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpRequest_QueryEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.QueryEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpRequest.QueryEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[6]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class AppGuardHttpRequest PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardHttpRequest) */ { + public: + inline AppGuardHttpRequest() : AppGuardHttpRequest(nullptr) {}; + virtual ~AppGuardHttpRequest(); + + AppGuardHttpRequest(const AppGuardHttpRequest& from); + AppGuardHttpRequest(AppGuardHttpRequest&& from) noexcept + : AppGuardHttpRequest() { + *this = ::std::move(from); + } + + inline AppGuardHttpRequest& operator=(const AppGuardHttpRequest& from) { + CopyFrom(from); + return *this; + } + inline AppGuardHttpRequest& operator=(AppGuardHttpRequest&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardHttpRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardHttpRequest* internal_default_instance() { + return reinterpret_cast( + &_AppGuardHttpRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(AppGuardHttpRequest& a, AppGuardHttpRequest& b) { + a.Swap(&b); + } + inline void Swap(AppGuardHttpRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardHttpRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardHttpRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardHttpRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardHttpRequest& from); + void MergeFrom(const AppGuardHttpRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardHttpRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardHttpRequest"; + } + protected: + explicit AppGuardHttpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kHeadersFieldNumber = 3, + kQueryFieldNumber = 6, + kTokenFieldNumber = 1, + kOriginalUrlFieldNumber = 2, + kMethodFieldNumber = 4, + kBodyFieldNumber = 5, + kTcpInfoFieldNumber = 100, + }; + // map headers = 3; + int headers_size() const; + private: + int _internal_headers_size() const; + public: + void clear_headers(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_headers(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_headers(); + + // map query = 6; + int query_size() const; + private: + int _internal_query_size() const; + public: + void clear_query(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_query() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_query(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + query() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_query(); + + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // string original_url = 2; + void clear_original_url(); + const std::string& original_url() const; + void set_original_url(const std::string& value); + void set_original_url(std::string&& value); + void set_original_url(const char* value); + void set_original_url(const char* value, size_t size); + std::string* mutable_original_url(); + std::string* release_original_url(); + void set_allocated_original_url(std::string* original_url); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_original_url(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_original_url( + std::string* original_url); + private: + const std::string& _internal_original_url() const; + void _internal_set_original_url(const std::string& value); + std::string* _internal_mutable_original_url(); + public: + + // string method = 4; + void clear_method(); + const std::string& method() const; + void set_method(const std::string& value); + void set_method(std::string&& value); + void set_method(const char* value); + void set_method(const char* value, size_t size); + std::string* mutable_method(); + std::string* release_method(); + void set_allocated_method(std::string* method); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_method(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_method( + std::string* method); + private: + const std::string& _internal_method() const; + void _internal_set_method(const std::string& value); + std::string* _internal_mutable_method(); + public: + + // string body = 5; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + void set_body(const std::string& value); + void set_body(std::string&& value); + void set_body(const char* value); + void set_body(const char* value, size_t size); + std::string* mutable_body(); + std::string* release_body(); + void set_allocated_body(std::string* body); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_body(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_body( + std::string* body); + private: + const std::string& _internal_body() const; + void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // .appguard.AppGuardTcpInfo tcp_info = 100; + bool has_tcp_info() const; + private: + bool _internal_has_tcp_info() const; + public: + void clear_tcp_info(); + const ::appguard::AppGuardTcpInfo& tcp_info() const; + ::appguard::AppGuardTcpInfo* release_tcp_info(); + ::appguard::AppGuardTcpInfo* mutable_tcp_info(); + void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); + private: + const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; + ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); + public: + void unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info); + ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); + + // @@protoc_insertion_point(class_scope:appguard.AppGuardHttpRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AppGuardHttpRequest_HeadersEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > headers_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AppGuardHttpRequest_QueryEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > query_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr original_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr method_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + ::appguard::AppGuardTcpInfo* tcp_info_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardHttpResponse_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AppGuardHttpResponse_HeadersEntry_DoNotUse(); + AppGuardHttpResponse_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AppGuardHttpResponse_HeadersEntry_DoNotUse& other); + static const AppGuardHttpResponse_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardHttpResponse_HeadersEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpResponse.HeadersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardHttpResponse.HeadersEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[8]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class AppGuardHttpResponse PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardHttpResponse) */ { + public: + inline AppGuardHttpResponse() : AppGuardHttpResponse(nullptr) {}; + virtual ~AppGuardHttpResponse(); + + AppGuardHttpResponse(const AppGuardHttpResponse& from); + AppGuardHttpResponse(AppGuardHttpResponse&& from) noexcept + : AppGuardHttpResponse() { + *this = ::std::move(from); + } + + inline AppGuardHttpResponse& operator=(const AppGuardHttpResponse& from) { + CopyFrom(from); + return *this; + } + inline AppGuardHttpResponse& operator=(AppGuardHttpResponse&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardHttpResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardHttpResponse* internal_default_instance() { + return reinterpret_cast( + &_AppGuardHttpResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(AppGuardHttpResponse& a, AppGuardHttpResponse& b) { + a.Swap(&b); + } + inline void Swap(AppGuardHttpResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardHttpResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardHttpResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardHttpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardHttpResponse& from); + void MergeFrom(const AppGuardHttpResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardHttpResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardHttpResponse"; + } + protected: + explicit AppGuardHttpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kHeadersFieldNumber = 3, + kTokenFieldNumber = 1, + kTcpInfoFieldNumber = 100, + kCodeFieldNumber = 2, + }; + // map headers = 3; + int headers_size() const; + private: + int _internal_headers_size() const; + public: + void clear_headers(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_headers(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_headers(); + + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // .appguard.AppGuardTcpInfo tcp_info = 100; + bool has_tcp_info() const; + private: + bool _internal_has_tcp_info() const; + public: + void clear_tcp_info(); + const ::appguard::AppGuardTcpInfo& tcp_info() const; + ::appguard::AppGuardTcpInfo* release_tcp_info(); + ::appguard::AppGuardTcpInfo* mutable_tcp_info(); + void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); + private: + const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; + ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); + public: + void unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info); + ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); + + // uint32 code = 2; + void clear_code(); + ::PROTOBUF_NAMESPACE_ID::uint32 code() const; + void set_code(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_code() const; + void _internal_set_code(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardHttpResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AppGuardHttpResponse_HeadersEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > headers_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + ::appguard::AppGuardTcpInfo* tcp_info_; + ::PROTOBUF_NAMESPACE_ID::uint32 code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardSmtpRequest_HeadersEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + AppGuardSmtpRequest_HeadersEntry_DoNotUse(); + AppGuardSmtpRequest_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const AppGuardSmtpRequest_HeadersEntry_DoNotUse& other); + static const AppGuardSmtpRequest_HeadersEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AppGuardSmtpRequest_HeadersEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardSmtpRequest.HeadersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "appguard.AppGuardSmtpRequest.HeadersEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[10]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class AppGuardSmtpRequest PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardSmtpRequest) */ { + public: + inline AppGuardSmtpRequest() : AppGuardSmtpRequest(nullptr) {}; + virtual ~AppGuardSmtpRequest(); + + AppGuardSmtpRequest(const AppGuardSmtpRequest& from); + AppGuardSmtpRequest(AppGuardSmtpRequest&& from) noexcept + : AppGuardSmtpRequest() { + *this = ::std::move(from); + } + + inline AppGuardSmtpRequest& operator=(const AppGuardSmtpRequest& from) { + CopyFrom(from); + return *this; + } + inline AppGuardSmtpRequest& operator=(AppGuardSmtpRequest&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardSmtpRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardSmtpRequest* internal_default_instance() { + return reinterpret_cast( + &_AppGuardSmtpRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(AppGuardSmtpRequest& a, AppGuardSmtpRequest& b) { + a.Swap(&b); + } + inline void Swap(AppGuardSmtpRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardSmtpRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardSmtpRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardSmtpRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardSmtpRequest& from); + void MergeFrom(const AppGuardSmtpRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardSmtpRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardSmtpRequest"; + } + protected: + explicit AppGuardSmtpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kHeadersFieldNumber = 2, + kTokenFieldNumber = 1, + kBodyFieldNumber = 3, + kTcpInfoFieldNumber = 100, + }; + // map headers = 2; + int headers_size() const; + private: + int _internal_headers_size() const; + public: + void clear_headers(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_headers(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + headers() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_headers(); + + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // string body = 3; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + void set_body(const std::string& value); + void set_body(std::string&& value); + void set_body(const char* value); + void set_body(const char* value, size_t size); + std::string* mutable_body(); + std::string* release_body(); + void set_allocated_body(std::string* body); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_body(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_body( + std::string* body); + private: + const std::string& _internal_body() const; + void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // .appguard.AppGuardTcpInfo tcp_info = 100; + bool has_tcp_info() const; + private: + bool _internal_has_tcp_info() const; + public: + void clear_tcp_info(); + const ::appguard::AppGuardTcpInfo& tcp_info() const; + ::appguard::AppGuardTcpInfo* release_tcp_info(); + ::appguard::AppGuardTcpInfo* mutable_tcp_info(); + void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); + private: + const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; + ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); + public: + void unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info); + ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); + + // @@protoc_insertion_point(class_scope:appguard.AppGuardSmtpRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + AppGuardSmtpRequest_HeadersEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > headers_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + ::appguard::AppGuardTcpInfo* tcp_info_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardSmtpResponse PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardSmtpResponse) */ { + public: + inline AppGuardSmtpResponse() : AppGuardSmtpResponse(nullptr) {}; + virtual ~AppGuardSmtpResponse(); + + AppGuardSmtpResponse(const AppGuardSmtpResponse& from); + AppGuardSmtpResponse(AppGuardSmtpResponse&& from) noexcept + : AppGuardSmtpResponse() { + *this = ::std::move(from); + } + + inline AppGuardSmtpResponse& operator=(const AppGuardSmtpResponse& from) { + CopyFrom(from); + return *this; + } + inline AppGuardSmtpResponse& operator=(AppGuardSmtpResponse&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardSmtpResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardSmtpResponse* internal_default_instance() { + return reinterpret_cast( + &_AppGuardSmtpResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(AppGuardSmtpResponse& a, AppGuardSmtpResponse& b) { + a.Swap(&b); + } + inline void Swap(AppGuardSmtpResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardSmtpResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardSmtpResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardSmtpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardSmtpResponse& from); + void MergeFrom(const AppGuardSmtpResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardSmtpResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardSmtpResponse"; + } + protected: + explicit AppGuardSmtpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTokenFieldNumber = 1, + kTcpInfoFieldNumber = 100, + kCodeFieldNumber = 2, + }; + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // .appguard.AppGuardTcpInfo tcp_info = 100; + bool has_tcp_info() const; + private: + bool _internal_has_tcp_info() const; + public: + void clear_tcp_info(); + const ::appguard::AppGuardTcpInfo& tcp_info() const; + ::appguard::AppGuardTcpInfo* release_tcp_info(); + ::appguard::AppGuardTcpInfo* mutable_tcp_info(); + void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); + private: + const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; + ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); + public: + void unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info); + ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); + + // uint32 code = 2; + bool has_code() const; + private: + bool _internal_has_code() const; + public: + void clear_code(); + ::PROTOBUF_NAMESPACE_ID::uint32 code() const; + void set_code(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_code() const; + void _internal_set_code(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardSmtpResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + ::appguard::AppGuardTcpInfo* tcp_info_; + ::PROTOBUF_NAMESPACE_ID::uint32 code_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardResponse PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardResponse) */ { + public: + inline AppGuardResponse() : AppGuardResponse(nullptr) {}; + virtual ~AppGuardResponse(); + + AppGuardResponse(const AppGuardResponse& from); + AppGuardResponse(AppGuardResponse&& from) noexcept + : AppGuardResponse() { + *this = ::std::move(from); + } + + inline AppGuardResponse& operator=(const AppGuardResponse& from) { + CopyFrom(from); + return *this; + } + inline AppGuardResponse& operator=(AppGuardResponse&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardResponse* internal_default_instance() { + return reinterpret_cast( + &_AppGuardResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(AppGuardResponse& a, AppGuardResponse& b) { + a.Swap(&b); + } + inline void Swap(AppGuardResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardResponse& from); + void MergeFrom(const AppGuardResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardResponse"; + } + protected: + explicit AppGuardResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPolicyFieldNumber = 2, + }; + // .appguard_commands.FirewallPolicy policy = 2; + void clear_policy(); + ::appguard_commands::FirewallPolicy policy() const; + void set_policy(::appguard_commands::FirewallPolicy value); + private: + ::appguard_commands::FirewallPolicy _internal_policy() const; + void _internal_set_policy(::appguard_commands::FirewallPolicy value); + public: + + // @@protoc_insertion_point(class_scope:appguard.AppGuardResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + int policy_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class AppGuardTcpResponse PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.AppGuardTcpResponse) */ { + public: + inline AppGuardTcpResponse() : AppGuardTcpResponse(nullptr) {}; + virtual ~AppGuardTcpResponse(); + + AppGuardTcpResponse(const AppGuardTcpResponse& from); + AppGuardTcpResponse(AppGuardTcpResponse&& from) noexcept + : AppGuardTcpResponse() { + *this = ::std::move(from); + } + + inline AppGuardTcpResponse& operator=(const AppGuardTcpResponse& from) { + CopyFrom(from); + return *this; + } + inline AppGuardTcpResponse& operator=(AppGuardTcpResponse&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AppGuardTcpResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AppGuardTcpResponse* internal_default_instance() { + return reinterpret_cast( + &_AppGuardTcpResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(AppGuardTcpResponse& a, AppGuardTcpResponse& b) { + a.Swap(&b); + } + inline void Swap(AppGuardTcpResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AppGuardTcpResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AppGuardTcpResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + AppGuardTcpResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AppGuardTcpResponse& from); + void MergeFrom(const AppGuardTcpResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AppGuardTcpResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.AppGuardTcpResponse"; + } + protected: + explicit AppGuardTcpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTcpInfoFieldNumber = 1, + }; + // .appguard.AppGuardTcpInfo tcp_info = 1; + bool has_tcp_info() const; + private: + bool _internal_has_tcp_info() const; + public: + void clear_tcp_info(); + const ::appguard::AppGuardTcpInfo& tcp_info() const; + ::appguard::AppGuardTcpInfo* release_tcp_info(); + ::appguard::AppGuardTcpInfo* mutable_tcp_info(); + void set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info); + private: + const ::appguard::AppGuardTcpInfo& _internal_tcp_info() const; + ::appguard::AppGuardTcpInfo* _internal_mutable_tcp_info(); + public: + void unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info); + ::appguard::AppGuardTcpInfo* unsafe_arena_release_tcp_info(); + + // @@protoc_insertion_point(class_scope:appguard.AppGuardTcpResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::appguard::AppGuardTcpInfo* tcp_info_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// ------------------------------------------------------------------- + +class Token PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard.Token) */ { + public: + inline Token() : Token(nullptr) {}; + virtual ~Token(); + + Token(const Token& from); + Token(Token&& from) noexcept + : Token() { + *this = ::std::move(from); + } + + inline Token& operator=(const Token& from) { + CopyFrom(from); + return *this; + } + inline Token& operator=(Token&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Token& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Token* internal_default_instance() { + return reinterpret_cast( + &_Token_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(Token& a, Token& b) { + a.Swap(&b); + } + inline void Swap(Token* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Token* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Token* New() const final { + return CreateMaybeMessage(nullptr); + } + + Token* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Token& from); + void MergeFrom(const Token& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Token* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard.Token"; + } + protected: + explicit Token(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_appguard_2eproto); + return ::descriptor_table_appguard_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTokenFieldNumber = 1, + }; + // string token = 1; + void clear_token(); + const std::string& token() const; + void set_token(const std::string& value); + void set_token(std::string&& value); + void set_token(const char* value); + void set_token(const char* value, size_t size); + std::string* mutable_token(); + std::string* release_token(); + void set_allocated_token(std::string* token); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_token(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_token( + std::string* token); + private: + const std::string& _internal_token() const; + void _internal_set_token(const std::string& value); + std::string* _internal_mutable_token(); + public: + + // @@protoc_insertion_point(class_scope:appguard.Token) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr token_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_appguard_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Logs + +// string token = 1; +inline void Logs::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Logs::token() const { + // @@protoc_insertion_point(field_get:appguard.Logs.token) + return _internal_token(); +} +inline void Logs::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.Logs.token) +} +inline std::string* Logs::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.Logs.token) + return _internal_mutable_token(); +} +inline const std::string& Logs::_internal_token() const { + return token_.Get(); +} +inline void Logs::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Logs::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.Logs.token) +} +inline void Logs::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.Logs.token) +} +inline void Logs::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.Logs.token) +} +inline std::string* Logs::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Logs::release_token() { + // @@protoc_insertion_point(field_release:appguard.Logs.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Logs::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.Logs.token) +} +inline std::string* Logs::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.Logs.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Logs::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.Logs.token) +} + +// repeated .appguard.Log logs = 3; +inline int Logs::_internal_logs_size() const { + return logs_.size(); +} +inline int Logs::logs_size() const { + return _internal_logs_size(); +} +inline void Logs::clear_logs() { + logs_.Clear(); +} +inline ::appguard::Log* Logs::mutable_logs(int index) { + // @@protoc_insertion_point(field_mutable:appguard.Logs.logs) + return logs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::appguard::Log >* +Logs::mutable_logs() { + // @@protoc_insertion_point(field_mutable_list:appguard.Logs.logs) + return &logs_; +} +inline const ::appguard::Log& Logs::_internal_logs(int index) const { + return logs_.Get(index); +} +inline const ::appguard::Log& Logs::logs(int index) const { + // @@protoc_insertion_point(field_get:appguard.Logs.logs) + return _internal_logs(index); +} +inline ::appguard::Log* Logs::_internal_add_logs() { + return logs_.Add(); +} +inline ::appguard::Log* Logs::add_logs() { + // @@protoc_insertion_point(field_add:appguard.Logs.logs) + return _internal_add_logs(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::appguard::Log >& +Logs::logs() const { + // @@protoc_insertion_point(field_list:appguard.Logs.logs) + return logs_; +} + +// ------------------------------------------------------------------- + +// Log + +// string timestamp = 1; +inline void Log::clear_timestamp() { + timestamp_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Log::timestamp() const { + // @@protoc_insertion_point(field_get:appguard.Log.timestamp) + return _internal_timestamp(); +} +inline void Log::set_timestamp(const std::string& value) { + _internal_set_timestamp(value); + // @@protoc_insertion_point(field_set:appguard.Log.timestamp) +} +inline std::string* Log::mutable_timestamp() { + // @@protoc_insertion_point(field_mutable:appguard.Log.timestamp) + return _internal_mutable_timestamp(); +} +inline const std::string& Log::_internal_timestamp() const { + return timestamp_.Get(); +} +inline void Log::_internal_set_timestamp(const std::string& value) { + + timestamp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Log::set_timestamp(std::string&& value) { + + timestamp_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.Log.timestamp) +} +inline void Log::set_timestamp(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + timestamp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.Log.timestamp) +} +inline void Log::set_timestamp(const char* value, + size_t size) { + + timestamp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.Log.timestamp) +} +inline std::string* Log::_internal_mutable_timestamp() { + + return timestamp_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Log::release_timestamp() { + // @@protoc_insertion_point(field_release:appguard.Log.timestamp) + return timestamp_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Log::set_allocated_timestamp(std::string* timestamp) { + if (timestamp != nullptr) { + + } else { + + } + timestamp_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), timestamp, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.Log.timestamp) +} +inline std::string* Log::unsafe_arena_release_timestamp() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.Log.timestamp) + GOOGLE_DCHECK(GetArena() != nullptr); + + return timestamp_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Log::unsafe_arena_set_allocated_timestamp( + std::string* timestamp) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (timestamp != nullptr) { + + } else { + + } + timestamp_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + timestamp, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.Log.timestamp) +} + +// string level = 2; +inline void Log::clear_level() { + level_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Log::level() const { + // @@protoc_insertion_point(field_get:appguard.Log.level) + return _internal_level(); +} +inline void Log::set_level(const std::string& value) { + _internal_set_level(value); + // @@protoc_insertion_point(field_set:appguard.Log.level) +} +inline std::string* Log::mutable_level() { + // @@protoc_insertion_point(field_mutable:appguard.Log.level) + return _internal_mutable_level(); +} +inline const std::string& Log::_internal_level() const { + return level_.Get(); +} +inline void Log::_internal_set_level(const std::string& value) { + + level_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Log::set_level(std::string&& value) { + + level_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.Log.level) +} +inline void Log::set_level(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + level_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.Log.level) +} +inline void Log::set_level(const char* value, + size_t size) { + + level_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.Log.level) +} +inline std::string* Log::_internal_mutable_level() { + + return level_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Log::release_level() { + // @@protoc_insertion_point(field_release:appguard.Log.level) + return level_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Log::set_allocated_level(std::string* level) { + if (level != nullptr) { + + } else { + + } + level_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), level, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.Log.level) +} +inline std::string* Log::unsafe_arena_release_level() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.Log.level) + GOOGLE_DCHECK(GetArena() != nullptr); + + return level_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Log::unsafe_arena_set_allocated_level( + std::string* level) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (level != nullptr) { + + } else { + + } + level_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + level, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.Log.level) +} + +// string message = 3; +inline void Log::clear_message() { + message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Log::message() const { + // @@protoc_insertion_point(field_get:appguard.Log.message) + return _internal_message(); +} +inline void Log::set_message(const std::string& value) { + _internal_set_message(value); + // @@protoc_insertion_point(field_set:appguard.Log.message) +} +inline std::string* Log::mutable_message() { + // @@protoc_insertion_point(field_mutable:appguard.Log.message) + return _internal_mutable_message(); +} +inline const std::string& Log::_internal_message() const { + return message_.Get(); +} +inline void Log::_internal_set_message(const std::string& value) { + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Log::set_message(std::string&& value) { + + message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.Log.message) +} +inline void Log::set_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.Log.message) +} +inline void Log::set_message(const char* value, + size_t size) { + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.Log.message) +} +inline std::string* Log::_internal_mutable_message() { + + return message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Log::release_message() { + // @@protoc_insertion_point(field_release:appguard.Log.message) + return message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Log::set_allocated_message(std::string* message) { + if (message != nullptr) { + + } else { + + } + message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.Log.message) +} +inline std::string* Log::unsafe_arena_release_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.Log.message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Log::unsafe_arena_set_allocated_message( + std::string* message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (message != nullptr) { + + } else { + + } + message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.Log.message) +} + +// ------------------------------------------------------------------- + +// AppGuardTcpConnection + +// string token = 1; +inline void AppGuardTcpConnection::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardTcpConnection::token() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.token) + return _internal_token(); +} +inline void AppGuardTcpConnection::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.token) +} +inline std::string* AppGuardTcpConnection::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.token) + return _internal_mutable_token(); +} +inline const std::string& AppGuardTcpConnection::_internal_token() const { + return token_.Get(); +} +inline void AppGuardTcpConnection::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardTcpConnection::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardTcpConnection.token) +} +inline void AppGuardTcpConnection::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardTcpConnection.token) +} +inline void AppGuardTcpConnection::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardTcpConnection.token) +} +inline std::string* AppGuardTcpConnection::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardTcpConnection::release_token() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardTcpConnection::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.token) +} +inline std::string* AppGuardTcpConnection::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardTcpConnection.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardTcpConnection::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpConnection.token) +} + +// string source_ip = 2; +inline bool AppGuardTcpConnection::_internal_has_source_ip() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AppGuardTcpConnection::has_source_ip() const { + return _internal_has_source_ip(); +} +inline void AppGuardTcpConnection::clear_source_ip() { + source_ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AppGuardTcpConnection::source_ip() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.source_ip) + return _internal_source_ip(); +} +inline void AppGuardTcpConnection::set_source_ip(const std::string& value) { + _internal_set_source_ip(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.source_ip) +} +inline std::string* AppGuardTcpConnection::mutable_source_ip() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.source_ip) + return _internal_mutable_source_ip(); +} +inline const std::string& AppGuardTcpConnection::_internal_source_ip() const { + return source_ip_.Get(); +} +inline void AppGuardTcpConnection::_internal_set_source_ip(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + source_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardTcpConnection::set_source_ip(std::string&& value) { + _has_bits_[0] |= 0x00000001u; + source_ip_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardTcpConnection.source_ip) +} +inline void AppGuardTcpConnection::set_source_ip(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000001u; + source_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardTcpConnection.source_ip) +} +inline void AppGuardTcpConnection::set_source_ip(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000001u; + source_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardTcpConnection.source_ip) +} +inline std::string* AppGuardTcpConnection::_internal_mutable_source_ip() { + _has_bits_[0] |= 0x00000001u; + return source_ip_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardTcpConnection::release_source_ip() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.source_ip) + if (!_internal_has_source_ip()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + return source_ip_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardTcpConnection::set_allocated_source_ip(std::string* source_ip) { + if (source_ip != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + source_ip_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source_ip, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.source_ip) +} +inline std::string* AppGuardTcpConnection::unsafe_arena_release_source_ip() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardTcpConnection.source_ip) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return source_ip_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardTcpConnection::unsafe_arena_set_allocated_source_ip( + std::string* source_ip) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (source_ip != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + source_ip_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + source_ip, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpConnection.source_ip) +} + +// uint32 source_port = 3; +inline bool AppGuardTcpConnection::_internal_has_source_port() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool AppGuardTcpConnection::has_source_port() const { + return _internal_has_source_port(); +} +inline void AppGuardTcpConnection::clear_source_port() { + source_port_ = 0u; + _has_bits_[0] &= ~0x00000004u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardTcpConnection::_internal_source_port() const { + return source_port_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardTcpConnection::source_port() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.source_port) + return _internal_source_port(); +} +inline void AppGuardTcpConnection::_internal_set_source_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _has_bits_[0] |= 0x00000004u; + source_port_ = value; +} +inline void AppGuardTcpConnection::set_source_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_source_port(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.source_port) +} + +// string destination_ip = 4; +inline bool AppGuardTcpConnection::_internal_has_destination_ip() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool AppGuardTcpConnection::has_destination_ip() const { + return _internal_has_destination_ip(); +} +inline void AppGuardTcpConnection::clear_destination_ip() { + destination_ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AppGuardTcpConnection::destination_ip() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.destination_ip) + return _internal_destination_ip(); +} +inline void AppGuardTcpConnection::set_destination_ip(const std::string& value) { + _internal_set_destination_ip(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.destination_ip) +} +inline std::string* AppGuardTcpConnection::mutable_destination_ip() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.destination_ip) + return _internal_mutable_destination_ip(); +} +inline const std::string& AppGuardTcpConnection::_internal_destination_ip() const { + return destination_ip_.Get(); +} +inline void AppGuardTcpConnection::_internal_set_destination_ip(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + destination_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardTcpConnection::set_destination_ip(std::string&& value) { + _has_bits_[0] |= 0x00000002u; + destination_ip_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardTcpConnection.destination_ip) +} +inline void AppGuardTcpConnection::set_destination_ip(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000002u; + destination_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardTcpConnection.destination_ip) +} +inline void AppGuardTcpConnection::set_destination_ip(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000002u; + destination_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardTcpConnection.destination_ip) +} +inline std::string* AppGuardTcpConnection::_internal_mutable_destination_ip() { + _has_bits_[0] |= 0x00000002u; + return destination_ip_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardTcpConnection::release_destination_ip() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.destination_ip) + if (!_internal_has_destination_ip()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + return destination_ip_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardTcpConnection::set_allocated_destination_ip(std::string* destination_ip) { + if (destination_ip != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + destination_ip_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), destination_ip, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.destination_ip) +} +inline std::string* AppGuardTcpConnection::unsafe_arena_release_destination_ip() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardTcpConnection.destination_ip) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000002u; + return destination_ip_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardTcpConnection::unsafe_arena_set_allocated_destination_ip( + std::string* destination_ip) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (destination_ip != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + destination_ip_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + destination_ip, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpConnection.destination_ip) +} + +// uint32 destination_port = 5; +inline bool AppGuardTcpConnection::_internal_has_destination_port() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool AppGuardTcpConnection::has_destination_port() const { + return _internal_has_destination_port(); +} +inline void AppGuardTcpConnection::clear_destination_port() { + destination_port_ = 0u; + _has_bits_[0] &= ~0x00000008u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardTcpConnection::_internal_destination_port() const { + return destination_port_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardTcpConnection::destination_port() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.destination_port) + return _internal_destination_port(); +} +inline void AppGuardTcpConnection::_internal_set_destination_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _has_bits_[0] |= 0x00000008u; + destination_port_ = value; +} +inline void AppGuardTcpConnection::set_destination_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_destination_port(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.destination_port) +} + +// string protocol = 6; +inline void AppGuardTcpConnection::clear_protocol() { + protocol_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardTcpConnection::protocol() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpConnection.protocol) + return _internal_protocol(); +} +inline void AppGuardTcpConnection::set_protocol(const std::string& value) { + _internal_set_protocol(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpConnection.protocol) +} +inline std::string* AppGuardTcpConnection::mutable_protocol() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpConnection.protocol) + return _internal_mutable_protocol(); +} +inline const std::string& AppGuardTcpConnection::_internal_protocol() const { + return protocol_.Get(); +} +inline void AppGuardTcpConnection::_internal_set_protocol(const std::string& value) { + + protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardTcpConnection::set_protocol(std::string&& value) { + + protocol_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardTcpConnection.protocol) +} +inline void AppGuardTcpConnection::set_protocol(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardTcpConnection.protocol) +} +inline void AppGuardTcpConnection::set_protocol(const char* value, + size_t size) { + + protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardTcpConnection.protocol) +} +inline std::string* AppGuardTcpConnection::_internal_mutable_protocol() { + + return protocol_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardTcpConnection::release_protocol() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpConnection.protocol) + return protocol_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardTcpConnection::set_allocated_protocol(std::string* protocol) { + if (protocol != nullptr) { + + } else { + + } + protocol_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), protocol, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpConnection.protocol) +} +inline std::string* AppGuardTcpConnection::unsafe_arena_release_protocol() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardTcpConnection.protocol) + GOOGLE_DCHECK(GetArena() != nullptr); + + return protocol_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardTcpConnection::unsafe_arena_set_allocated_protocol( + std::string* protocol) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (protocol != nullptr) { + + } else { + + } + protocol_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + protocol, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpConnection.protocol) +} + +// ------------------------------------------------------------------- + +// AppGuardIpInfo + +// string ip = 1; +inline void AppGuardIpInfo::clear_ip() { + ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardIpInfo::ip() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.ip) + return _internal_ip(); +} +inline void AppGuardIpInfo::set_ip(const std::string& value) { + _internal_set_ip(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.ip) +} +inline std::string* AppGuardIpInfo::mutable_ip() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.ip) + return _internal_mutable_ip(); +} +inline const std::string& AppGuardIpInfo::_internal_ip() const { + return ip_.Get(); +} +inline void AppGuardIpInfo::_internal_set_ip(const std::string& value) { + + ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_ip(std::string&& value) { + + ip_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.ip) +} +inline void AppGuardIpInfo::set_ip(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.ip) +} +inline void AppGuardIpInfo::set_ip(const char* value, + size_t size) { + + ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.ip) +} +inline std::string* AppGuardIpInfo::_internal_mutable_ip() { + + return ip_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_ip() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.ip) + return ip_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_ip(std::string* ip) { + if (ip != nullptr) { + + } else { + + } + ip_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ip, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.ip) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_ip() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.ip) + GOOGLE_DCHECK(GetArena() != nullptr); + + return ip_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_ip( + std::string* ip) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (ip != nullptr) { + + } else { + + } + ip_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ip, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.ip) +} + +// string country = 2; +inline bool AppGuardIpInfo::_internal_has_country() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_country() const { + return _internal_has_country(); +} +inline void AppGuardIpInfo::clear_country() { + country_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AppGuardIpInfo::country() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.country) + return _internal_country(); +} +inline void AppGuardIpInfo::set_country(const std::string& value) { + _internal_set_country(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.country) +} +inline std::string* AppGuardIpInfo::mutable_country() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.country) + return _internal_mutable_country(); +} +inline const std::string& AppGuardIpInfo::_internal_country() const { + return country_.Get(); +} +inline void AppGuardIpInfo::_internal_set_country(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + country_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_country(std::string&& value) { + _has_bits_[0] |= 0x00000001u; + country_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.country) +} +inline void AppGuardIpInfo::set_country(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000001u; + country_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.country) +} +inline void AppGuardIpInfo::set_country(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000001u; + country_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.country) +} +inline std::string* AppGuardIpInfo::_internal_mutable_country() { + _has_bits_[0] |= 0x00000001u; + return country_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_country() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.country) + if (!_internal_has_country()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + return country_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_country(std::string* country) { + if (country != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + country_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), country, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.country) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_country() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.country) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return country_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_country( + std::string* country) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (country != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + country_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + country, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.country) +} + +// string asn = 3; +inline bool AppGuardIpInfo::_internal_has_asn() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_asn() const { + return _internal_has_asn(); +} +inline void AppGuardIpInfo::clear_asn() { + asn_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AppGuardIpInfo::asn() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.asn) + return _internal_asn(); +} +inline void AppGuardIpInfo::set_asn(const std::string& value) { + _internal_set_asn(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.asn) +} +inline std::string* AppGuardIpInfo::mutable_asn() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.asn) + return _internal_mutable_asn(); +} +inline const std::string& AppGuardIpInfo::_internal_asn() const { + return asn_.Get(); +} +inline void AppGuardIpInfo::_internal_set_asn(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + asn_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_asn(std::string&& value) { + _has_bits_[0] |= 0x00000002u; + asn_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.asn) +} +inline void AppGuardIpInfo::set_asn(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000002u; + asn_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.asn) +} +inline void AppGuardIpInfo::set_asn(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000002u; + asn_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.asn) +} +inline std::string* AppGuardIpInfo::_internal_mutable_asn() { + _has_bits_[0] |= 0x00000002u; + return asn_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_asn() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.asn) + if (!_internal_has_asn()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + return asn_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_asn(std::string* asn) { + if (asn != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + asn_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), asn, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.asn) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_asn() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.asn) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000002u; + return asn_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_asn( + std::string* asn) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (asn != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + asn_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + asn, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.asn) +} + +// string org = 4; +inline bool AppGuardIpInfo::_internal_has_org() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_org() const { + return _internal_has_org(); +} +inline void AppGuardIpInfo::clear_org() { + org_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& AppGuardIpInfo::org() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.org) + return _internal_org(); +} +inline void AppGuardIpInfo::set_org(const std::string& value) { + _internal_set_org(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.org) +} +inline std::string* AppGuardIpInfo::mutable_org() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.org) + return _internal_mutable_org(); +} +inline const std::string& AppGuardIpInfo::_internal_org() const { + return org_.Get(); +} +inline void AppGuardIpInfo::_internal_set_org(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + org_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_org(std::string&& value) { + _has_bits_[0] |= 0x00000004u; + org_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.org) +} +inline void AppGuardIpInfo::set_org(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000004u; + org_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.org) +} +inline void AppGuardIpInfo::set_org(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000004u; + org_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.org) +} +inline std::string* AppGuardIpInfo::_internal_mutable_org() { + _has_bits_[0] |= 0x00000004u; + return org_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_org() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.org) + if (!_internal_has_org()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + return org_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_org(std::string* org) { + if (org != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + org_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), org, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.org) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_org() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.org) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000004u; + return org_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_org( + std::string* org) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (org != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + org_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + org, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.org) +} + +// string continent_code = 5; +inline bool AppGuardIpInfo::_internal_has_continent_code() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_continent_code() const { + return _internal_has_continent_code(); +} +inline void AppGuardIpInfo::clear_continent_code() { + continent_code_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& AppGuardIpInfo::continent_code() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.continent_code) + return _internal_continent_code(); +} +inline void AppGuardIpInfo::set_continent_code(const std::string& value) { + _internal_set_continent_code(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.continent_code) +} +inline std::string* AppGuardIpInfo::mutable_continent_code() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.continent_code) + return _internal_mutable_continent_code(); +} +inline const std::string& AppGuardIpInfo::_internal_continent_code() const { + return continent_code_.Get(); +} +inline void AppGuardIpInfo::_internal_set_continent_code(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + continent_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_continent_code(std::string&& value) { + _has_bits_[0] |= 0x00000008u; + continent_code_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.continent_code) +} +inline void AppGuardIpInfo::set_continent_code(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000008u; + continent_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.continent_code) +} +inline void AppGuardIpInfo::set_continent_code(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000008u; + continent_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.continent_code) +} +inline std::string* AppGuardIpInfo::_internal_mutable_continent_code() { + _has_bits_[0] |= 0x00000008u; + return continent_code_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_continent_code() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.continent_code) + if (!_internal_has_continent_code()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + return continent_code_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_continent_code(std::string* continent_code) { + if (continent_code != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + continent_code_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), continent_code, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.continent_code) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_continent_code() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.continent_code) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000008u; + return continent_code_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_continent_code( + std::string* continent_code) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (continent_code != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + continent_code_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + continent_code, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.continent_code) +} + +// string city = 6; +inline bool AppGuardIpInfo::_internal_has_city() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_city() const { + return _internal_has_city(); +} +inline void AppGuardIpInfo::clear_city() { + city_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& AppGuardIpInfo::city() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.city) + return _internal_city(); +} +inline void AppGuardIpInfo::set_city(const std::string& value) { + _internal_set_city(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.city) +} +inline std::string* AppGuardIpInfo::mutable_city() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.city) + return _internal_mutable_city(); +} +inline const std::string& AppGuardIpInfo::_internal_city() const { + return city_.Get(); +} +inline void AppGuardIpInfo::_internal_set_city(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + city_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_city(std::string&& value) { + _has_bits_[0] |= 0x00000010u; + city_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.city) +} +inline void AppGuardIpInfo::set_city(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000010u; + city_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.city) +} +inline void AppGuardIpInfo::set_city(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000010u; + city_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.city) +} +inline std::string* AppGuardIpInfo::_internal_mutable_city() { + _has_bits_[0] |= 0x00000010u; + return city_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_city() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.city) + if (!_internal_has_city()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + return city_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_city(std::string* city) { + if (city != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + city_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), city, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.city) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_city() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.city) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000010u; + return city_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_city( + std::string* city) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (city != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + city_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + city, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.city) +} + +// string region = 7; +inline bool AppGuardIpInfo::_internal_has_region() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_region() const { + return _internal_has_region(); +} +inline void AppGuardIpInfo::clear_region() { + region_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000020u; +} +inline const std::string& AppGuardIpInfo::region() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.region) + return _internal_region(); +} +inline void AppGuardIpInfo::set_region(const std::string& value) { + _internal_set_region(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.region) +} +inline std::string* AppGuardIpInfo::mutable_region() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.region) + return _internal_mutable_region(); +} +inline const std::string& AppGuardIpInfo::_internal_region() const { + return region_.Get(); +} +inline void AppGuardIpInfo::_internal_set_region(const std::string& value) { + _has_bits_[0] |= 0x00000020u; + region_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_region(std::string&& value) { + _has_bits_[0] |= 0x00000020u; + region_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.region) +} +inline void AppGuardIpInfo::set_region(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000020u; + region_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.region) +} +inline void AppGuardIpInfo::set_region(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000020u; + region_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.region) +} +inline std::string* AppGuardIpInfo::_internal_mutable_region() { + _has_bits_[0] |= 0x00000020u; + return region_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_region() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.region) + if (!_internal_has_region()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000020u; + return region_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_region(std::string* region) { + if (region != nullptr) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + region_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), region, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.region) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_region() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.region) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000020u; + return region_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_region( + std::string* region) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (region != nullptr) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + region_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + region, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.region) +} + +// string postal = 8; +inline bool AppGuardIpInfo::_internal_has_postal() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_postal() const { + return _internal_has_postal(); +} +inline void AppGuardIpInfo::clear_postal() { + postal_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000040u; +} +inline const std::string& AppGuardIpInfo::postal() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.postal) + return _internal_postal(); +} +inline void AppGuardIpInfo::set_postal(const std::string& value) { + _internal_set_postal(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.postal) +} +inline std::string* AppGuardIpInfo::mutable_postal() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.postal) + return _internal_mutable_postal(); +} +inline const std::string& AppGuardIpInfo::_internal_postal() const { + return postal_.Get(); +} +inline void AppGuardIpInfo::_internal_set_postal(const std::string& value) { + _has_bits_[0] |= 0x00000040u; + postal_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_postal(std::string&& value) { + _has_bits_[0] |= 0x00000040u; + postal_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.postal) +} +inline void AppGuardIpInfo::set_postal(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000040u; + postal_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.postal) +} +inline void AppGuardIpInfo::set_postal(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000040u; + postal_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.postal) +} +inline std::string* AppGuardIpInfo::_internal_mutable_postal() { + _has_bits_[0] |= 0x00000040u; + return postal_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_postal() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.postal) + if (!_internal_has_postal()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000040u; + return postal_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_postal(std::string* postal) { + if (postal != nullptr) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + postal_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), postal, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.postal) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_postal() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.postal) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000040u; + return postal_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_postal( + std::string* postal) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (postal != nullptr) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + postal_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + postal, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.postal) +} + +// string timezone = 9; +inline bool AppGuardIpInfo::_internal_has_timezone() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool AppGuardIpInfo::has_timezone() const { + return _internal_has_timezone(); +} +inline void AppGuardIpInfo::clear_timezone() { + timezone_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000080u; +} +inline const std::string& AppGuardIpInfo::timezone() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.timezone) + return _internal_timezone(); +} +inline void AppGuardIpInfo::set_timezone(const std::string& value) { + _internal_set_timezone(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.timezone) +} +inline std::string* AppGuardIpInfo::mutable_timezone() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardIpInfo.timezone) + return _internal_mutable_timezone(); +} +inline const std::string& AppGuardIpInfo::_internal_timezone() const { + return timezone_.Get(); +} +inline void AppGuardIpInfo::_internal_set_timezone(const std::string& value) { + _has_bits_[0] |= 0x00000080u; + timezone_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardIpInfo::set_timezone(std::string&& value) { + _has_bits_[0] |= 0x00000080u; + timezone_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardIpInfo.timezone) +} +inline void AppGuardIpInfo::set_timezone(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000080u; + timezone_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardIpInfo.timezone) +} +inline void AppGuardIpInfo::set_timezone(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000080u; + timezone_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardIpInfo.timezone) +} +inline std::string* AppGuardIpInfo::_internal_mutable_timezone() { + _has_bits_[0] |= 0x00000080u; + return timezone_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardIpInfo::release_timezone() { + // @@protoc_insertion_point(field_release:appguard.AppGuardIpInfo.timezone) + if (!_internal_has_timezone()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000080u; + return timezone_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardIpInfo::set_allocated_timezone(std::string* timezone) { + if (timezone != nullptr) { + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + timezone_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), timezone, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardIpInfo.timezone) +} +inline std::string* AppGuardIpInfo::unsafe_arena_release_timezone() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardIpInfo.timezone) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000080u; + return timezone_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardIpInfo::unsafe_arena_set_allocated_timezone( + std::string* timezone) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (timezone != nullptr) { + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + timezone_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + timezone, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardIpInfo.timezone) +} + +// bool blacklist = 100; +inline void AppGuardIpInfo::clear_blacklist() { + blacklist_ = false; +} +inline bool AppGuardIpInfo::_internal_blacklist() const { + return blacklist_; +} +inline bool AppGuardIpInfo::blacklist() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardIpInfo.blacklist) + return _internal_blacklist(); +} +inline void AppGuardIpInfo::_internal_set_blacklist(bool value) { + + blacklist_ = value; +} +inline void AppGuardIpInfo::set_blacklist(bool value) { + _internal_set_blacklist(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardIpInfo.blacklist) +} + +// ------------------------------------------------------------------- + +// AppGuardTcpInfo + +// .appguard.AppGuardTcpConnection connection = 1; +inline bool AppGuardTcpInfo::_internal_has_connection() const { + return this != internal_default_instance() && connection_ != nullptr; +} +inline bool AppGuardTcpInfo::has_connection() const { + return _internal_has_connection(); +} +inline void AppGuardTcpInfo::clear_connection() { + if (GetArena() == nullptr && connection_ != nullptr) { + delete connection_; + } + connection_ = nullptr; +} +inline const ::appguard::AppGuardTcpConnection& AppGuardTcpInfo::_internal_connection() const { + const ::appguard::AppGuardTcpConnection* p = connection_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpConnection_default_instance_); +} +inline const ::appguard::AppGuardTcpConnection& AppGuardTcpInfo::connection() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.connection) + return _internal_connection(); +} +inline void AppGuardTcpInfo::unsafe_arena_set_allocated_connection( + ::appguard::AppGuardTcpConnection* connection) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(connection_); + } + connection_ = connection; + if (connection) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpInfo.connection) +} +inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::release_connection() { + auto temp = unsafe_arena_release_connection(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::unsafe_arena_release_connection() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpInfo.connection) + + ::appguard::AppGuardTcpConnection* temp = connection_; + connection_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::_internal_mutable_connection() { + + if (connection_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpConnection>(GetArena()); + connection_ = p; + } + return connection_; +} +inline ::appguard::AppGuardTcpConnection* AppGuardTcpInfo::mutable_connection() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpInfo.connection) + return _internal_mutable_connection(); +} +inline void AppGuardTcpInfo::set_allocated_connection(::appguard::AppGuardTcpConnection* connection) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete connection_; + } + if (connection) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(connection); + if (message_arena != submessage_arena) { + connection = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, connection, submessage_arena); + } + + } else { + + } + connection_ = connection; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpInfo.connection) +} + +// .appguard.AppGuardIpInfo ip_info = 2; +inline bool AppGuardTcpInfo::_internal_has_ip_info() const { + return this != internal_default_instance() && ip_info_ != nullptr; +} +inline bool AppGuardTcpInfo::has_ip_info() const { + return _internal_has_ip_info(); +} +inline void AppGuardTcpInfo::clear_ip_info() { + if (GetArena() == nullptr && ip_info_ != nullptr) { + delete ip_info_; + } + ip_info_ = nullptr; +} +inline const ::appguard::AppGuardIpInfo& AppGuardTcpInfo::_internal_ip_info() const { + const ::appguard::AppGuardIpInfo* p = ip_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardIpInfo_default_instance_); +} +inline const ::appguard::AppGuardIpInfo& AppGuardTcpInfo::ip_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.ip_info) + return _internal_ip_info(); +} +inline void AppGuardTcpInfo::unsafe_arena_set_allocated_ip_info( + ::appguard::AppGuardIpInfo* ip_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ip_info_); + } + ip_info_ = ip_info; + if (ip_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpInfo.ip_info) +} +inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::release_ip_info() { + auto temp = unsafe_arena_release_ip_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::unsafe_arena_release_ip_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpInfo.ip_info) + + ::appguard::AppGuardIpInfo* temp = ip_info_; + ip_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::_internal_mutable_ip_info() { + + if (ip_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardIpInfo>(GetArena()); + ip_info_ = p; + } + return ip_info_; +} +inline ::appguard::AppGuardIpInfo* AppGuardTcpInfo::mutable_ip_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpInfo.ip_info) + return _internal_mutable_ip_info(); +} +inline void AppGuardTcpInfo::set_allocated_ip_info(::appguard::AppGuardIpInfo* ip_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete ip_info_; + } + if (ip_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(ip_info); + if (message_arena != submessage_arena) { + ip_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ip_info, submessage_arena); + } + + } else { + + } + ip_info_ = ip_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpInfo.ip_info) +} + +// uint64 tcp_id = 3; +inline void AppGuardTcpInfo::clear_tcp_id() { + tcp_id_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 AppGuardTcpInfo::_internal_tcp_id() const { + return tcp_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 AppGuardTcpInfo::tcp_id() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpInfo.tcp_id) + return _internal_tcp_id(); +} +inline void AppGuardTcpInfo::_internal_set_tcp_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + tcp_id_ = value; +} +inline void AppGuardTcpInfo::set_tcp_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_tcp_id(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardTcpInfo.tcp_id) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AppGuardHttpRequest + +// string token = 1; +inline void AppGuardHttpRequest::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardHttpRequest::token() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.token) + return _internal_token(); +} +inline void AppGuardHttpRequest::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.token) +} +inline std::string* AppGuardHttpRequest::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.token) + return _internal_mutable_token(); +} +inline const std::string& AppGuardHttpRequest::_internal_token() const { + return token_.Get(); +} +inline void AppGuardHttpRequest::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardHttpRequest::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardHttpRequest.token) +} +inline void AppGuardHttpRequest::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardHttpRequest.token) +} +inline void AppGuardHttpRequest::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardHttpRequest.token) +} +inline std::string* AppGuardHttpRequest::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardHttpRequest::release_token() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardHttpRequest::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.token) +} +inline std::string* AppGuardHttpRequest::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardHttpRequest.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardHttpRequest::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.token) +} + +// string original_url = 2; +inline void AppGuardHttpRequest::clear_original_url() { + original_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardHttpRequest::original_url() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.original_url) + return _internal_original_url(); +} +inline void AppGuardHttpRequest::set_original_url(const std::string& value) { + _internal_set_original_url(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.original_url) +} +inline std::string* AppGuardHttpRequest::mutable_original_url() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.original_url) + return _internal_mutable_original_url(); +} +inline const std::string& AppGuardHttpRequest::_internal_original_url() const { + return original_url_.Get(); +} +inline void AppGuardHttpRequest::_internal_set_original_url(const std::string& value) { + + original_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardHttpRequest::set_original_url(std::string&& value) { + + original_url_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardHttpRequest.original_url) +} +inline void AppGuardHttpRequest::set_original_url(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + original_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardHttpRequest.original_url) +} +inline void AppGuardHttpRequest::set_original_url(const char* value, + size_t size) { + + original_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardHttpRequest.original_url) +} +inline std::string* AppGuardHttpRequest::_internal_mutable_original_url() { + + return original_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardHttpRequest::release_original_url() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.original_url) + return original_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardHttpRequest::set_allocated_original_url(std::string* original_url) { + if (original_url != nullptr) { + + } else { + + } + original_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), original_url, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.original_url) +} +inline std::string* AppGuardHttpRequest::unsafe_arena_release_original_url() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardHttpRequest.original_url) + GOOGLE_DCHECK(GetArena() != nullptr); + + return original_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardHttpRequest::unsafe_arena_set_allocated_original_url( + std::string* original_url) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (original_url != nullptr) { + + } else { + + } + original_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + original_url, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.original_url) +} + +// map headers = 3; +inline int AppGuardHttpRequest::_internal_headers_size() const { + return headers_.size(); +} +inline int AppGuardHttpRequest::headers_size() const { + return _internal_headers_size(); +} +inline void AppGuardHttpRequest::clear_headers() { + headers_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpRequest::_internal_headers() const { + return headers_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpRequest::headers() const { + // @@protoc_insertion_point(field_map:appguard.AppGuardHttpRequest.headers) + return _internal_headers(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpRequest::_internal_mutable_headers() { + return headers_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpRequest::mutable_headers() { + // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpRequest.headers) + return _internal_mutable_headers(); +} + +// string method = 4; +inline void AppGuardHttpRequest::clear_method() { + method_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardHttpRequest::method() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.method) + return _internal_method(); +} +inline void AppGuardHttpRequest::set_method(const std::string& value) { + _internal_set_method(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.method) +} +inline std::string* AppGuardHttpRequest::mutable_method() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.method) + return _internal_mutable_method(); +} +inline const std::string& AppGuardHttpRequest::_internal_method() const { + return method_.Get(); +} +inline void AppGuardHttpRequest::_internal_set_method(const std::string& value) { + + method_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardHttpRequest::set_method(std::string&& value) { + + method_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardHttpRequest.method) +} +inline void AppGuardHttpRequest::set_method(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + method_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardHttpRequest.method) +} +inline void AppGuardHttpRequest::set_method(const char* value, + size_t size) { + + method_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardHttpRequest.method) +} +inline std::string* AppGuardHttpRequest::_internal_mutable_method() { + + return method_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardHttpRequest::release_method() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.method) + return method_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardHttpRequest::set_allocated_method(std::string* method) { + if (method != nullptr) { + + } else { + + } + method_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), method, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.method) +} +inline std::string* AppGuardHttpRequest::unsafe_arena_release_method() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardHttpRequest.method) + GOOGLE_DCHECK(GetArena() != nullptr); + + return method_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardHttpRequest::unsafe_arena_set_allocated_method( + std::string* method) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (method != nullptr) { + + } else { + + } + method_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + method, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.method) +} + +// string body = 5; +inline bool AppGuardHttpRequest::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AppGuardHttpRequest::has_body() const { + return _internal_has_body(); +} +inline void AppGuardHttpRequest::clear_body() { + body_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AppGuardHttpRequest::body() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.body) + return _internal_body(); +} +inline void AppGuardHttpRequest::set_body(const std::string& value) { + _internal_set_body(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpRequest.body) +} +inline std::string* AppGuardHttpRequest::mutable_body() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.body) + return _internal_mutable_body(); +} +inline const std::string& AppGuardHttpRequest::_internal_body() const { + return body_.Get(); +} +inline void AppGuardHttpRequest::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardHttpRequest::set_body(std::string&& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardHttpRequest.body) +} +inline void AppGuardHttpRequest::set_body(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardHttpRequest.body) +} +inline void AppGuardHttpRequest::set_body(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardHttpRequest.body) +} +inline std::string* AppGuardHttpRequest::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardHttpRequest::release_body() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + return body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardHttpRequest::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.body) +} +inline std::string* AppGuardHttpRequest::unsafe_arena_release_body() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardHttpRequest.body) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return body_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardHttpRequest::unsafe_arena_set_allocated_body( + std::string* body) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + body, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.body) +} + +// map query = 6; +inline int AppGuardHttpRequest::_internal_query_size() const { + return query_.size(); +} +inline int AppGuardHttpRequest::query_size() const { + return _internal_query_size(); +} +inline void AppGuardHttpRequest::clear_query() { + query_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpRequest::_internal_query() const { + return query_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpRequest::query() const { + // @@protoc_insertion_point(field_map:appguard.AppGuardHttpRequest.query) + return _internal_query(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpRequest::_internal_mutable_query() { + return query_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpRequest::mutable_query() { + // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpRequest.query) + return _internal_mutable_query(); +} + +// .appguard.AppGuardTcpInfo tcp_info = 100; +inline bool AppGuardHttpRequest::_internal_has_tcp_info() const { + return this != internal_default_instance() && tcp_info_ != nullptr; +} +inline bool AppGuardHttpRequest::has_tcp_info() const { + return _internal_has_tcp_info(); +} +inline void AppGuardHttpRequest::clear_tcp_info() { + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; +} +inline const ::appguard::AppGuardTcpInfo& AppGuardHttpRequest::_internal_tcp_info() const { + const ::appguard::AppGuardTcpInfo* p = tcp_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpInfo_default_instance_); +} +inline const ::appguard::AppGuardTcpInfo& AppGuardHttpRequest::tcp_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpRequest.tcp_info) + return _internal_tcp_info(); +} +inline void AppGuardHttpRequest::unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tcp_info_); + } + tcp_info_ = tcp_info; + if (tcp_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpRequest.tcp_info) +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::release_tcp_info() { + auto temp = unsafe_arena_release_tcp_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::unsafe_arena_release_tcp_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpRequest.tcp_info) + + ::appguard::AppGuardTcpInfo* temp = tcp_info_; + tcp_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::_internal_mutable_tcp_info() { + + if (tcp_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArena()); + tcp_info_ = p; + } + return tcp_info_; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpRequest::mutable_tcp_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpRequest.tcp_info) + return _internal_mutable_tcp_info(); +} +inline void AppGuardHttpRequest::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete tcp_info_; + } + if (tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tcp_info); + if (message_arena != submessage_arena) { + tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tcp_info, submessage_arena); + } + + } else { + + } + tcp_info_ = tcp_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpRequest.tcp_info) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AppGuardHttpResponse + +// string token = 1; +inline void AppGuardHttpResponse::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardHttpResponse::token() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.token) + return _internal_token(); +} +inline void AppGuardHttpResponse::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpResponse.token) +} +inline std::string* AppGuardHttpResponse::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpResponse.token) + return _internal_mutable_token(); +} +inline const std::string& AppGuardHttpResponse::_internal_token() const { + return token_.Get(); +} +inline void AppGuardHttpResponse::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardHttpResponse::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardHttpResponse.token) +} +inline void AppGuardHttpResponse::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardHttpResponse.token) +} +inline void AppGuardHttpResponse::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardHttpResponse.token) +} +inline std::string* AppGuardHttpResponse::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardHttpResponse::release_token() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpResponse.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardHttpResponse::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpResponse.token) +} +inline std::string* AppGuardHttpResponse::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardHttpResponse.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardHttpResponse::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpResponse.token) +} + +// uint32 code = 2; +inline void AppGuardHttpResponse::clear_code() { + code_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardHttpResponse::_internal_code() const { + return code_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardHttpResponse::code() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.code) + return _internal_code(); +} +inline void AppGuardHttpResponse::_internal_set_code(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + code_ = value; +} +inline void AppGuardHttpResponse::set_code(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_code(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardHttpResponse.code) +} + +// map headers = 3; +inline int AppGuardHttpResponse::_internal_headers_size() const { + return headers_.size(); +} +inline int AppGuardHttpResponse::headers_size() const { + return _internal_headers_size(); +} +inline void AppGuardHttpResponse::clear_headers() { + headers_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpResponse::_internal_headers() const { + return headers_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardHttpResponse::headers() const { + // @@protoc_insertion_point(field_map:appguard.AppGuardHttpResponse.headers) + return _internal_headers(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpResponse::_internal_mutable_headers() { + return headers_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardHttpResponse::mutable_headers() { + // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardHttpResponse.headers) + return _internal_mutable_headers(); +} + +// .appguard.AppGuardTcpInfo tcp_info = 100; +inline bool AppGuardHttpResponse::_internal_has_tcp_info() const { + return this != internal_default_instance() && tcp_info_ != nullptr; +} +inline bool AppGuardHttpResponse::has_tcp_info() const { + return _internal_has_tcp_info(); +} +inline void AppGuardHttpResponse::clear_tcp_info() { + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; +} +inline const ::appguard::AppGuardTcpInfo& AppGuardHttpResponse::_internal_tcp_info() const { + const ::appguard::AppGuardTcpInfo* p = tcp_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpInfo_default_instance_); +} +inline const ::appguard::AppGuardTcpInfo& AppGuardHttpResponse::tcp_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardHttpResponse.tcp_info) + return _internal_tcp_info(); +} +inline void AppGuardHttpResponse::unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tcp_info_); + } + tcp_info_ = tcp_info; + if (tcp_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardHttpResponse.tcp_info) +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::release_tcp_info() { + auto temp = unsafe_arena_release_tcp_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::unsafe_arena_release_tcp_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardHttpResponse.tcp_info) + + ::appguard::AppGuardTcpInfo* temp = tcp_info_; + tcp_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::_internal_mutable_tcp_info() { + + if (tcp_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArena()); + tcp_info_ = p; + } + return tcp_info_; +} +inline ::appguard::AppGuardTcpInfo* AppGuardHttpResponse::mutable_tcp_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardHttpResponse.tcp_info) + return _internal_mutable_tcp_info(); +} +inline void AppGuardHttpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete tcp_info_; + } + if (tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tcp_info); + if (message_arena != submessage_arena) { + tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tcp_info, submessage_arena); + } + + } else { + + } + tcp_info_ = tcp_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardHttpResponse.tcp_info) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// AppGuardSmtpRequest + +// string token = 1; +inline void AppGuardSmtpRequest::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardSmtpRequest::token() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.token) + return _internal_token(); +} +inline void AppGuardSmtpRequest::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpRequest.token) +} +inline std::string* AppGuardSmtpRequest::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.token) + return _internal_mutable_token(); +} +inline const std::string& AppGuardSmtpRequest::_internal_token() const { + return token_.Get(); +} +inline void AppGuardSmtpRequest::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardSmtpRequest::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardSmtpRequest.token) +} +inline void AppGuardSmtpRequest::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardSmtpRequest.token) +} +inline void AppGuardSmtpRequest::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardSmtpRequest.token) +} +inline std::string* AppGuardSmtpRequest::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardSmtpRequest::release_token() { + // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardSmtpRequest::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.token) +} +inline std::string* AppGuardSmtpRequest::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardSmtpRequest.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardSmtpRequest::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpRequest.token) +} + +// map headers = 2; +inline int AppGuardSmtpRequest::_internal_headers_size() const { + return headers_.size(); +} +inline int AppGuardSmtpRequest::headers_size() const { + return _internal_headers_size(); +} +inline void AppGuardSmtpRequest::clear_headers() { + headers_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardSmtpRequest::_internal_headers() const { + return headers_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +AppGuardSmtpRequest::headers() const { + // @@protoc_insertion_point(field_map:appguard.AppGuardSmtpRequest.headers) + return _internal_headers(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardSmtpRequest::_internal_mutable_headers() { + return headers_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +AppGuardSmtpRequest::mutable_headers() { + // @@protoc_insertion_point(field_mutable_map:appguard.AppGuardSmtpRequest.headers) + return _internal_mutable_headers(); +} + +// string body = 3; +inline bool AppGuardSmtpRequest::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AppGuardSmtpRequest::has_body() const { + return _internal_has_body(); +} +inline void AppGuardSmtpRequest::clear_body() { + body_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AppGuardSmtpRequest::body() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.body) + return _internal_body(); +} +inline void AppGuardSmtpRequest::set_body(const std::string& value) { + _internal_set_body(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpRequest.body) +} +inline std::string* AppGuardSmtpRequest::mutable_body() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.body) + return _internal_mutable_body(); +} +inline const std::string& AppGuardSmtpRequest::_internal_body() const { + return body_.Get(); +} +inline void AppGuardSmtpRequest::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardSmtpRequest::set_body(std::string&& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardSmtpRequest.body) +} +inline void AppGuardSmtpRequest::set_body(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardSmtpRequest.body) +} +inline void AppGuardSmtpRequest::set_body(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000001u; + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardSmtpRequest.body) +} +inline std::string* AppGuardSmtpRequest::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardSmtpRequest::release_body() { + // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + return body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardSmtpRequest::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.body) +} +inline std::string* AppGuardSmtpRequest::unsafe_arena_release_body() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardSmtpRequest.body) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return body_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardSmtpRequest::unsafe_arena_set_allocated_body( + std::string* body) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + body, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpRequest.body) +} + +// .appguard.AppGuardTcpInfo tcp_info = 100; +inline bool AppGuardSmtpRequest::_internal_has_tcp_info() const { + return this != internal_default_instance() && tcp_info_ != nullptr; +} +inline bool AppGuardSmtpRequest::has_tcp_info() const { + return _internal_has_tcp_info(); +} +inline void AppGuardSmtpRequest::clear_tcp_info() { + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; +} +inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpRequest::_internal_tcp_info() const { + const ::appguard::AppGuardTcpInfo* p = tcp_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpInfo_default_instance_); +} +inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpRequest::tcp_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpRequest.tcp_info) + return _internal_tcp_info(); +} +inline void AppGuardSmtpRequest::unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tcp_info_); + } + tcp_info_ = tcp_info; + if (tcp_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpRequest.tcp_info) +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::release_tcp_info() { + auto temp = unsafe_arena_release_tcp_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::unsafe_arena_release_tcp_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpRequest.tcp_info) + + ::appguard::AppGuardTcpInfo* temp = tcp_info_; + tcp_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::_internal_mutable_tcp_info() { + + if (tcp_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArena()); + tcp_info_ = p; + } + return tcp_info_; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpRequest::mutable_tcp_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpRequest.tcp_info) + return _internal_mutable_tcp_info(); +} +inline void AppGuardSmtpRequest::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete tcp_info_; + } + if (tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tcp_info); + if (message_arena != submessage_arena) { + tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tcp_info, submessage_arena); + } + + } else { + + } + tcp_info_ = tcp_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpRequest.tcp_info) +} + +// ------------------------------------------------------------------- + +// AppGuardSmtpResponse + +// string token = 1; +inline void AppGuardSmtpResponse::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AppGuardSmtpResponse::token() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.token) + return _internal_token(); +} +inline void AppGuardSmtpResponse::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpResponse.token) +} +inline std::string* AppGuardSmtpResponse::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpResponse.token) + return _internal_mutable_token(); +} +inline const std::string& AppGuardSmtpResponse::_internal_token() const { + return token_.Get(); +} +inline void AppGuardSmtpResponse::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AppGuardSmtpResponse::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.AppGuardSmtpResponse.token) +} +inline void AppGuardSmtpResponse::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.AppGuardSmtpResponse.token) +} +inline void AppGuardSmtpResponse::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.AppGuardSmtpResponse.token) +} +inline std::string* AppGuardSmtpResponse::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AppGuardSmtpResponse::release_token() { + // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpResponse.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AppGuardSmtpResponse::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpResponse.token) +} +inline std::string* AppGuardSmtpResponse::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.AppGuardSmtpResponse.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AppGuardSmtpResponse::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpResponse.token) +} + +// uint32 code = 2; +inline bool AppGuardSmtpResponse::_internal_has_code() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AppGuardSmtpResponse::has_code() const { + return _internal_has_code(); +} +inline void AppGuardSmtpResponse::clear_code() { + code_ = 0u; + _has_bits_[0] &= ~0x00000001u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardSmtpResponse::_internal_code() const { + return code_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 AppGuardSmtpResponse::code() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.code) + return _internal_code(); +} +inline void AppGuardSmtpResponse::_internal_set_code(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _has_bits_[0] |= 0x00000001u; + code_ = value; +} +inline void AppGuardSmtpResponse::set_code(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_code(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardSmtpResponse.code) +} + +// .appguard.AppGuardTcpInfo tcp_info = 100; +inline bool AppGuardSmtpResponse::_internal_has_tcp_info() const { + return this != internal_default_instance() && tcp_info_ != nullptr; +} +inline bool AppGuardSmtpResponse::has_tcp_info() const { + return _internal_has_tcp_info(); +} +inline void AppGuardSmtpResponse::clear_tcp_info() { + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; +} +inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpResponse::_internal_tcp_info() const { + const ::appguard::AppGuardTcpInfo* p = tcp_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpInfo_default_instance_); +} +inline const ::appguard::AppGuardTcpInfo& AppGuardSmtpResponse::tcp_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardSmtpResponse.tcp_info) + return _internal_tcp_info(); +} +inline void AppGuardSmtpResponse::unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tcp_info_); + } + tcp_info_ = tcp_info; + if (tcp_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardSmtpResponse.tcp_info) +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::release_tcp_info() { + auto temp = unsafe_arena_release_tcp_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::unsafe_arena_release_tcp_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardSmtpResponse.tcp_info) + + ::appguard::AppGuardTcpInfo* temp = tcp_info_; + tcp_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::_internal_mutable_tcp_info() { + + if (tcp_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArena()); + tcp_info_ = p; + } + return tcp_info_; +} +inline ::appguard::AppGuardTcpInfo* AppGuardSmtpResponse::mutable_tcp_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardSmtpResponse.tcp_info) + return _internal_mutable_tcp_info(); +} +inline void AppGuardSmtpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete tcp_info_; + } + if (tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tcp_info); + if (message_arena != submessage_arena) { + tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tcp_info, submessage_arena); + } + + } else { + + } + tcp_info_ = tcp_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardSmtpResponse.tcp_info) +} + +// ------------------------------------------------------------------- + +// AppGuardResponse + +// .appguard_commands.FirewallPolicy policy = 2; +inline void AppGuardResponse::clear_policy() { + policy_ = 0; +} +inline ::appguard_commands::FirewallPolicy AppGuardResponse::_internal_policy() const { + return static_cast< ::appguard_commands::FirewallPolicy >(policy_); +} +inline ::appguard_commands::FirewallPolicy AppGuardResponse::policy() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardResponse.policy) + return _internal_policy(); +} +inline void AppGuardResponse::_internal_set_policy(::appguard_commands::FirewallPolicy value) { + + policy_ = value; +} +inline void AppGuardResponse::set_policy(::appguard_commands::FirewallPolicy value) { + _internal_set_policy(value); + // @@protoc_insertion_point(field_set:appguard.AppGuardResponse.policy) +} + +// ------------------------------------------------------------------- + +// AppGuardTcpResponse + +// .appguard.AppGuardTcpInfo tcp_info = 1; +inline bool AppGuardTcpResponse::_internal_has_tcp_info() const { + return this != internal_default_instance() && tcp_info_ != nullptr; +} +inline bool AppGuardTcpResponse::has_tcp_info() const { + return _internal_has_tcp_info(); +} +inline void AppGuardTcpResponse::clear_tcp_info() { + if (GetArena() == nullptr && tcp_info_ != nullptr) { + delete tcp_info_; + } + tcp_info_ = nullptr; +} +inline const ::appguard::AppGuardTcpInfo& AppGuardTcpResponse::_internal_tcp_info() const { + const ::appguard::AppGuardTcpInfo* p = tcp_info_; + return p != nullptr ? *p : *reinterpret_cast( + &::appguard::_AppGuardTcpInfo_default_instance_); +} +inline const ::appguard::AppGuardTcpInfo& AppGuardTcpResponse::tcp_info() const { + // @@protoc_insertion_point(field_get:appguard.AppGuardTcpResponse.tcp_info) + return _internal_tcp_info(); +} +inline void AppGuardTcpResponse::unsafe_arena_set_allocated_tcp_info( + ::appguard::AppGuardTcpInfo* tcp_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tcp_info_); + } + tcp_info_ = tcp_info; + if (tcp_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.AppGuardTcpResponse.tcp_info) +} +inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::release_tcp_info() { + auto temp = unsafe_arena_release_tcp_info(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::unsafe_arena_release_tcp_info() { + // @@protoc_insertion_point(field_release:appguard.AppGuardTcpResponse.tcp_info) + + ::appguard::AppGuardTcpInfo* temp = tcp_info_; + tcp_info_ = nullptr; + return temp; +} +inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::_internal_mutable_tcp_info() { + + if (tcp_info_ == nullptr) { + auto* p = CreateMaybeMessage<::appguard::AppGuardTcpInfo>(GetArena()); + tcp_info_ = p; + } + return tcp_info_; +} +inline ::appguard::AppGuardTcpInfo* AppGuardTcpResponse::mutable_tcp_info() { + // @@protoc_insertion_point(field_mutable:appguard.AppGuardTcpResponse.tcp_info) + return _internal_mutable_tcp_info(); +} +inline void AppGuardTcpResponse::set_allocated_tcp_info(::appguard::AppGuardTcpInfo* tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete tcp_info_; + } + if (tcp_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tcp_info); + if (message_arena != submessage_arena) { + tcp_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tcp_info, submessage_arena); + } + + } else { + + } + tcp_info_ = tcp_info; + // @@protoc_insertion_point(field_set_allocated:appguard.AppGuardTcpResponse.tcp_info) +} + +// ------------------------------------------------------------------- + +// Token + +// string token = 1; +inline void Token::clear_token() { + token_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Token::token() const { + // @@protoc_insertion_point(field_get:appguard.Token.token) + return _internal_token(); +} +inline void Token::set_token(const std::string& value) { + _internal_set_token(value); + // @@protoc_insertion_point(field_set:appguard.Token.token) +} +inline std::string* Token::mutable_token() { + // @@protoc_insertion_point(field_mutable:appguard.Token.token) + return _internal_mutable_token(); +} +inline const std::string& Token::_internal_token() const { + return token_.Get(); +} +inline void Token::_internal_set_token(const std::string& value) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Token::set_token(std::string&& value) { + + token_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard.Token.token) +} +inline void Token::set_token(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard.Token.token) +} +inline void Token::set_token(const char* value, + size_t size) { + + token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard.Token.token) +} +inline std::string* Token::_internal_mutable_token() { + + return token_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Token::release_token() { + // @@protoc_insertion_point(field_release:appguard.Token.token) + return token_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Token::set_allocated_token(std::string* token) { + if (token != nullptr) { + + } else { + + } + token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), token, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard.Token.token) +} +inline std::string* Token::unsafe_arena_release_token() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard.Token.token) + GOOGLE_DCHECK(GetArena() != nullptr); + + return token_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Token::unsafe_arena_set_allocated_token( + std::string* token) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (token != nullptr) { + + } else { + + } + token_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + token, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard.Token.token) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace appguard + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_appguard_2eproto diff --git a/src/generated/commands.grpc.pb.cc b/src/generated/commands.grpc.pb.cc new file mode 100644 index 0000000..6f63773 --- /dev/null +++ b/src/generated/commands.grpc.pb.cc @@ -0,0 +1,25 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: commands.proto + +#include "commands.pb.h" +#include "commands.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace appguard_commands { + +} // namespace appguard_commands + diff --git a/src/generated/commands.grpc.pb.h b/src/generated/commands.grpc.pb.h new file mode 100644 index 0000000..39ac0d6 --- /dev/null +++ b/src/generated/commands.grpc.pb.h @@ -0,0 +1,34 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: commands.proto +#ifndef GRPC_commands_2eproto__INCLUDED +#define GRPC_commands_2eproto__INCLUDED + +#include "commands.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace appguard_commands { + +} // namespace appguard_commands + + +#endif // GRPC_commands_2eproto__INCLUDED diff --git a/src/generated/commands.pb.cc b/src/generated/commands.pb.cc new file mode 100644 index 0000000..4e20469 --- /dev/null +++ b/src/generated/commands.pb.cc @@ -0,0 +1,2303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands.proto + +#include "commands.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_commands_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Authentication_commands_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_commands_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AuthenticationData_commands_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_commands_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AuthorizationRequest_commands_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_commands_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FirewallDefaults_commands_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fempty_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Empty_google_2fprotobuf_2fempty_2eproto; +namespace appguard_commands { +class AuthorizationRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AuthorizationRequest_default_instance_; +class AuthenticationDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Authentication_default_instance_; +class ClientMessageDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; + const ::appguard_commands::AuthorizationRequest* authorization_request_; + const ::appguard_commands::Authentication* authentication_; +} _ClientMessage_default_instance_; +class AuthenticationDataDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _AuthenticationData_default_instance_; +class ServerMessageDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr update_token_command_; + const ::appguard_commands::FirewallDefaults* set_firewall_defaults_; + const PROTOBUF_NAMESPACE_ID::Empty* heartbeat_; + const ::appguard_commands::AuthenticationData* device_authorized_; + const PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized_; + const PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected_; +} _ServerMessage_default_instance_; +class FirewallDefaultsDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _FirewallDefaults_default_instance_; +} // namespace appguard_commands +static void InitDefaultsscc_info_Authentication_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_Authentication_default_instance_; + new (ptr) ::appguard_commands::Authentication(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::Authentication::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Authentication_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Authentication_commands_2eproto}, {}}; + +static void InitDefaultsscc_info_AuthenticationData_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_AuthenticationData_default_instance_; + new (ptr) ::appguard_commands::AuthenticationData(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::AuthenticationData::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AuthenticationData_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AuthenticationData_commands_2eproto}, {}}; + +static void InitDefaultsscc_info_AuthorizationRequest_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_AuthorizationRequest_default_instance_; + new (ptr) ::appguard_commands::AuthorizationRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::AuthorizationRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AuthorizationRequest_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_AuthorizationRequest_commands_2eproto}, {}}; + +static void InitDefaultsscc_info_ClientMessage_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_ClientMessage_default_instance_; + new (ptr) ::appguard_commands::ClientMessage(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::ClientMessage::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ClientMessage_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ClientMessage_commands_2eproto}, { + &scc_info_AuthorizationRequest_commands_2eproto.base, + &scc_info_Authentication_commands_2eproto.base,}}; + +static void InitDefaultsscc_info_FirewallDefaults_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_FirewallDefaults_default_instance_; + new (ptr) ::appguard_commands::FirewallDefaults(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::FirewallDefaults::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FirewallDefaults_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FirewallDefaults_commands_2eproto}, {}}; + +static void InitDefaultsscc_info_ServerMessage_commands_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::appguard_commands::_ServerMessage_default_instance_; + new (ptr) ::appguard_commands::ServerMessage(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::appguard_commands::ServerMessage::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_ServerMessage_commands_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_ServerMessage_commands_2eproto}, { + &scc_info_FirewallDefaults_commands_2eproto.base, + &scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base, + &scc_info_AuthenticationData_commands_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_commands_2eproto[6]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_commands_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_commands_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_commands_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, uuid_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, code_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, category_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, type_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthorizationRequest, target_os_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::Authentication, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::Authentication, app_id_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::Authentication, app_secret_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::ClientMessage, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::ClientMessage, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + offsetof(::appguard_commands::ClientMessageDefaultTypeInternal, authorization_request_), + offsetof(::appguard_commands::ClientMessageDefaultTypeInternal, authentication_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::ClientMessage, message_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthenticationData, _has_bits_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthenticationData, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthenticationData, app_id_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::AuthenticationData, app_secret_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::ServerMessage, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::ServerMessage, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, update_token_command_), + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, set_firewall_defaults_), + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, heartbeat_), + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, device_authorized_), + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, device_deauthorized_), + offsetof(::appguard_commands::ServerMessageDefaultTypeInternal, authorization_rejected_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::ServerMessage, message_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::FirewallDefaults, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::appguard_commands::FirewallDefaults, timeout_), + PROTOBUF_FIELD_OFFSET(::appguard_commands::FirewallDefaults, policy_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::appguard_commands::AuthorizationRequest)}, + { 10, -1, sizeof(::appguard_commands::Authentication)}, + { 17, -1, sizeof(::appguard_commands::ClientMessage)}, + { 25, 32, sizeof(::appguard_commands::AuthenticationData)}, + { 34, -1, sizeof(::appguard_commands::ServerMessage)}, + { 46, -1, sizeof(::appguard_commands::FirewallDefaults)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::appguard_commands::_AuthorizationRequest_default_instance_), + reinterpret_cast(&::appguard_commands::_Authentication_default_instance_), + reinterpret_cast(&::appguard_commands::_ClientMessage_default_instance_), + reinterpret_cast(&::appguard_commands::_AuthenticationData_default_instance_), + reinterpret_cast(&::appguard_commands::_ServerMessage_default_instance_), + reinterpret_cast(&::appguard_commands::_FirewallDefaults_default_instance_), +}; + +const char descriptor_table_protodef_commands_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\016commands.proto\022\021appguard_commands\032\033goo" + "gle/protobuf/empty.proto\"e\n\024Authorizatio" + "nRequest\022\014\n\004uuid\030\001 \001(\t\022\014\n\004code\030\002 \001(\t\022\020\n\010" + "category\030\003 \001(\t\022\014\n\004type\030\004 \001(\t\022\021\n\ttarget_o" + "s\030\005 \001(\t\"4\n\016Authentication\022\016\n\006app_id\030\001 \001(" + "\t\022\022\n\napp_secret\030\002 \001(\t\"\241\001\n\rClientMessage\022" + "H\n\025authorization_request\030\001 \001(\0132\'.appguar" + "d_commands.AuthorizationRequestH\000\022;\n\016aut" + "hentication\030\002 \001(\0132!.appguard_commands.Au" + "thenticationH\000B\t\n\007message\"\\\n\022Authenticat" + "ionData\022\023\n\006app_id\030\001 \001(\tH\000\210\001\001\022\027\n\napp_secr" + "et\030\002 \001(\tH\001\210\001\001B\t\n\007_app_idB\r\n\013_app_secret\"" + "\342\002\n\rServerMessage\022\036\n\024update_token_comman" + "d\030\001 \001(\tH\000\022D\n\025set_firewall_defaults\030\002 \001(\013" + "2#.appguard_commands.FirewallDefaultsH\000\022" + "+\n\theartbeat\030\003 \001(\0132\026.google.protobuf.Emp" + "tyH\000\022B\n\021device_authorized\030\004 \001(\0132%.appgua" + "rd_commands.AuthenticationDataH\000\0225\n\023devi" + "ce_deauthorized\030\005 \001(\0132\026.google.protobuf." + "EmptyH\000\0228\n\026authorization_rejected\030\006 \001(\0132" + "\026.google.protobuf.EmptyH\000B\t\n\007message\"V\n\020" + "FirewallDefaults\022\017\n\007timeout\030\001 \001(\r\0221\n\006pol" + "icy\030\002 \001(\0162!.appguard_commands.FirewallPo" + "licy*2\n\016FirewallPolicy\022\013\n\007UNKNOWN\020\000\022\t\n\005A" + "LLOW\020\001\022\010\n\004DENY\020\002b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_commands_2eproto_deps[1] = { + &::descriptor_table_google_2fprotobuf_2fempty_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_commands_2eproto_sccs[6] = { + &scc_info_Authentication_commands_2eproto.base, + &scc_info_AuthenticationData_commands_2eproto.base, + &scc_info_AuthorizationRequest_commands_2eproto.base, + &scc_info_ClientMessage_commands_2eproto.base, + &scc_info_FirewallDefaults_commands_2eproto.base, + &scc_info_ServerMessage_commands_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_commands_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_commands_2eproto = { + false, false, descriptor_table_protodef_commands_2eproto, "commands.proto", 984, + &descriptor_table_commands_2eproto_once, descriptor_table_commands_2eproto_sccs, descriptor_table_commands_2eproto_deps, 6, 1, + schemas, file_default_instances, TableStruct_commands_2eproto::offsets, + file_level_metadata_commands_2eproto, 6, file_level_enum_descriptors_commands_2eproto, file_level_service_descriptors_commands_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_commands_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_commands_2eproto)), true); +namespace appguard_commands { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FirewallPolicy_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_commands_2eproto); + return file_level_enum_descriptors_commands_2eproto[0]; +} +bool FirewallPolicy_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + + +// =================================================================== + +void AuthorizationRequest::InitAsDefaultInstance() { +} +class AuthorizationRequest::_Internal { + public: +}; + +AuthorizationRequest::AuthorizationRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.AuthorizationRequest) +} +AuthorizationRequest::AuthorizationRequest(const AuthorizationRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + uuid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_uuid().empty()) { + uuid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_uuid(), + GetArena()); + } + code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_code().empty()) { + code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_code(), + GetArena()); + } + category_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_category().empty()) { + category_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_category(), + GetArena()); + } + type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_type().empty()) { + type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_type(), + GetArena()); + } + target_os_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_target_os().empty()) { + target_os_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_target_os(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard_commands.AuthorizationRequest) +} + +void AuthorizationRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AuthorizationRequest_commands_2eproto.base); + uuid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + category_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + target_os_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AuthorizationRequest::~AuthorizationRequest() { + // @@protoc_insertion_point(destructor:appguard_commands.AuthorizationRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AuthorizationRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + uuid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + code_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + category_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + target_os_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AuthorizationRequest::ArenaDtor(void* object) { + AuthorizationRequest* _this = reinterpret_cast< AuthorizationRequest* >(object); + (void)_this; +} +void AuthorizationRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AuthorizationRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AuthorizationRequest& AuthorizationRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AuthorizationRequest_commands_2eproto.base); + return *internal_default_instance(); +} + + +void AuthorizationRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.AuthorizationRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + uuid_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + code_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + category_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + target_os_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AuthorizationRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string uuid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_uuid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthorizationRequest.uuid")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string code = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_code(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthorizationRequest.code")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string category = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_category(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthorizationRequest.category")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string type = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_type(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthorizationRequest.type")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string target_os = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_target_os(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthorizationRequest.target_os")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AuthorizationRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.AuthorizationRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string uuid = 1; + if (this->uuid().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_uuid().data(), static_cast(this->_internal_uuid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthorizationRequest.uuid"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_uuid(), target); + } + + // string code = 2; + if (this->code().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_code().data(), static_cast(this->_internal_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthorizationRequest.code"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_code(), target); + } + + // string category = 3; + if (this->category().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_category().data(), static_cast(this->_internal_category().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthorizationRequest.category"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_category(), target); + } + + // string type = 4; + if (this->type().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_type().data(), static_cast(this->_internal_type().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthorizationRequest.type"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_type(), target); + } + + // string target_os = 5; + if (this->target_os().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_target_os().data(), static_cast(this->_internal_target_os().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthorizationRequest.target_os"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_target_os(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.AuthorizationRequest) + return target; +} + +size_t AuthorizationRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.AuthorizationRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string uuid = 1; + if (this->uuid().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_uuid()); + } + + // string code = 2; + if (this->code().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_code()); + } + + // string category = 3; + if (this->category().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_category()); + } + + // string type = 4; + if (this->type().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_type()); + } + + // string target_os = 5; + if (this->target_os().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_target_os()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AuthorizationRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.AuthorizationRequest) + GOOGLE_DCHECK_NE(&from, this); + const AuthorizationRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.AuthorizationRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.AuthorizationRequest) + MergeFrom(*source); + } +} + +void AuthorizationRequest::MergeFrom(const AuthorizationRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.AuthorizationRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.uuid().size() > 0) { + _internal_set_uuid(from._internal_uuid()); + } + if (from.code().size() > 0) { + _internal_set_code(from._internal_code()); + } + if (from.category().size() > 0) { + _internal_set_category(from._internal_category()); + } + if (from.type().size() > 0) { + _internal_set_type(from._internal_type()); + } + if (from.target_os().size() > 0) { + _internal_set_target_os(from._internal_target_os()); + } +} + +void AuthorizationRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.AuthorizationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AuthorizationRequest::CopyFrom(const AuthorizationRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.AuthorizationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AuthorizationRequest::IsInitialized() const { + return true; +} + +void AuthorizationRequest::InternalSwap(AuthorizationRequest* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + uuid_.Swap(&other->uuid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + code_.Swap(&other->code_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + category_.Swap(&other->category_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + type_.Swap(&other->type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + target_os_.Swap(&other->target_os_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AuthorizationRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Authentication::InitAsDefaultInstance() { +} +class Authentication::_Internal { + public: +}; + +Authentication::Authentication(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.Authentication) +} +Authentication::Authentication(const Authentication& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + app_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_app_id().empty()) { + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_app_id(), + GetArena()); + } + app_secret_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_app_secret().empty()) { + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_app_secret(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard_commands.Authentication) +} + +void Authentication::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Authentication_commands_2eproto.base); + app_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + app_secret_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Authentication::~Authentication() { + // @@protoc_insertion_point(destructor:appguard_commands.Authentication) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Authentication::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + app_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + app_secret_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Authentication::ArenaDtor(void* object) { + Authentication* _this = reinterpret_cast< Authentication* >(object); + (void)_this; +} +void Authentication::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Authentication::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Authentication& Authentication::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Authentication_commands_2eproto.base); + return *internal_default_instance(); +} + + +void Authentication::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.Authentication) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + app_id_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + app_secret_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Authentication::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string app_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_app_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.Authentication.app_id")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string app_secret = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_app_secret(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.Authentication.app_secret")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Authentication::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.Authentication) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string app_id = 1; + if (this->app_id().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_app_id().data(), static_cast(this->_internal_app_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.Authentication.app_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_app_id(), target); + } + + // string app_secret = 2; + if (this->app_secret().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_app_secret().data(), static_cast(this->_internal_app_secret().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.Authentication.app_secret"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_app_secret(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.Authentication) + return target; +} + +size_t Authentication::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.Authentication) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string app_id = 1; + if (this->app_id().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_app_id()); + } + + // string app_secret = 2; + if (this->app_secret().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_app_secret()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Authentication::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.Authentication) + GOOGLE_DCHECK_NE(&from, this); + const Authentication* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.Authentication) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.Authentication) + MergeFrom(*source); + } +} + +void Authentication::MergeFrom(const Authentication& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.Authentication) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.app_id().size() > 0) { + _internal_set_app_id(from._internal_app_id()); + } + if (from.app_secret().size() > 0) { + _internal_set_app_secret(from._internal_app_secret()); + } +} + +void Authentication::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.Authentication) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Authentication::CopyFrom(const Authentication& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.Authentication) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Authentication::IsInitialized() const { + return true; +} + +void Authentication::InternalSwap(Authentication* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + app_id_.Swap(&other->app_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + app_secret_.Swap(&other->app_secret_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Authentication::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ClientMessage::InitAsDefaultInstance() { + ::appguard_commands::_ClientMessage_default_instance_.authorization_request_ = const_cast< ::appguard_commands::AuthorizationRequest*>( + ::appguard_commands::AuthorizationRequest::internal_default_instance()); + ::appguard_commands::_ClientMessage_default_instance_.authentication_ = const_cast< ::appguard_commands::Authentication*>( + ::appguard_commands::Authentication::internal_default_instance()); +} +class ClientMessage::_Internal { + public: + static const ::appguard_commands::AuthorizationRequest& authorization_request(const ClientMessage* msg); + static const ::appguard_commands::Authentication& authentication(const ClientMessage* msg); +}; + +const ::appguard_commands::AuthorizationRequest& +ClientMessage::_Internal::authorization_request(const ClientMessage* msg) { + return *msg->message_.authorization_request_; +} +const ::appguard_commands::Authentication& +ClientMessage::_Internal::authentication(const ClientMessage* msg) { + return *msg->message_.authentication_; +} +void ClientMessage::set_allocated_authorization_request(::appguard_commands::AuthorizationRequest* authorization_request) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (authorization_request) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(authorization_request); + if (message_arena != submessage_arena) { + authorization_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, authorization_request, submessage_arena); + } + set_has_authorization_request(); + message_.authorization_request_ = authorization_request; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ClientMessage.authorization_request) +} +void ClientMessage::set_allocated_authentication(::appguard_commands::Authentication* authentication) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (authentication) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(authentication); + if (message_arena != submessage_arena) { + authentication = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, authentication, submessage_arena); + } + set_has_authentication(); + message_.authentication_ = authentication; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ClientMessage.authentication) +} +ClientMessage::ClientMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.ClientMessage) +} +ClientMessage::ClientMessage(const ClientMessage& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + clear_has_message(); + switch (from.message_case()) { + case kAuthorizationRequest: { + _internal_mutable_authorization_request()->::appguard_commands::AuthorizationRequest::MergeFrom(from._internal_authorization_request()); + break; + } + case kAuthentication: { + _internal_mutable_authentication()->::appguard_commands::Authentication::MergeFrom(from._internal_authentication()); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:appguard_commands.ClientMessage) +} + +void ClientMessage::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ClientMessage_commands_2eproto.base); + clear_has_message(); +} + +ClientMessage::~ClientMessage() { + // @@protoc_insertion_point(destructor:appguard_commands.ClientMessage) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void ClientMessage::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (has_message()) { + clear_message(); + } +} + +void ClientMessage::ArenaDtor(void* object) { + ClientMessage* _this = reinterpret_cast< ClientMessage* >(object); + (void)_this; +} +void ClientMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ClientMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ClientMessage& ClientMessage::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ClientMessage_commands_2eproto.base); + return *internal_default_instance(); +} + + +void ClientMessage::clear_message() { +// @@protoc_insertion_point(one_of_clear_start:appguard_commands.ClientMessage) + switch (message_case()) { + case kAuthorizationRequest: { + if (GetArena() == nullptr) { + delete message_.authorization_request_; + } + break; + } + case kAuthentication: { + if (GetArena() == nullptr) { + delete message_.authentication_; + } + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_NOT_SET; +} + + +void ClientMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.ClientMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_message(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ClientMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .appguard_commands.AuthorizationRequest authorization_request = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_authorization_request(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard_commands.Authentication authentication = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_authentication(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ClientMessage::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.ClientMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .appguard_commands.AuthorizationRequest authorization_request = 1; + if (_internal_has_authorization_request()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::authorization_request(this), target, stream); + } + + // .appguard_commands.Authentication authentication = 2; + if (_internal_has_authentication()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::authentication(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.ClientMessage) + return target; +} + +size_t ClientMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.ClientMessage) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + switch (message_case()) { + // .appguard_commands.AuthorizationRequest authorization_request = 1; + case kAuthorizationRequest: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.authorization_request_); + break; + } + // .appguard_commands.Authentication authentication = 2; + case kAuthentication: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.authentication_); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ClientMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.ClientMessage) + GOOGLE_DCHECK_NE(&from, this); + const ClientMessage* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.ClientMessage) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.ClientMessage) + MergeFrom(*source); + } +} + +void ClientMessage::MergeFrom(const ClientMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.ClientMessage) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + switch (from.message_case()) { + case kAuthorizationRequest: { + _internal_mutable_authorization_request()->::appguard_commands::AuthorizationRequest::MergeFrom(from._internal_authorization_request()); + break; + } + case kAuthentication: { + _internal_mutable_authentication()->::appguard_commands::Authentication::MergeFrom(from._internal_authentication()); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } +} + +void ClientMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.ClientMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ClientMessage::CopyFrom(const ClientMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.ClientMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientMessage::IsInitialized() const { + return true; +} + +void ClientMessage::InternalSwap(ClientMessage* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(message_, other->message_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ClientMessage::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void AuthenticationData::InitAsDefaultInstance() { +} +class AuthenticationData::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_app_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_app_secret(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +AuthenticationData::AuthenticationData(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.AuthenticationData) +} +AuthenticationData::AuthenticationData(const AuthenticationData& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + app_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_app_id()) { + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_app_id(), + GetArena()); + } + app_secret_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (from._internal_has_app_secret()) { + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_app_secret(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:appguard_commands.AuthenticationData) +} + +void AuthenticationData::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_AuthenticationData_commands_2eproto.base); + app_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + app_secret_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +AuthenticationData::~AuthenticationData() { + // @@protoc_insertion_point(destructor:appguard_commands.AuthenticationData) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void AuthenticationData::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + app_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + app_secret_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AuthenticationData::ArenaDtor(void* object) { + AuthenticationData* _this = reinterpret_cast< AuthenticationData* >(object); + (void)_this; +} +void AuthenticationData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AuthenticationData::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const AuthenticationData& AuthenticationData::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AuthenticationData_commands_2eproto.base); + return *internal_default_instance(); +} + + +void AuthenticationData::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.AuthenticationData) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + app_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + app_secret_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AuthenticationData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string app_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_app_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthenticationData.app_id")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string app_secret = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_app_secret(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.AuthenticationData.app_secret")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* AuthenticationData::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.AuthenticationData) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string app_id = 1; + if (_internal_has_app_id()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_app_id().data(), static_cast(this->_internal_app_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthenticationData.app_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_app_id(), target); + } + + // string app_secret = 2; + if (_internal_has_app_secret()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_app_secret().data(), static_cast(this->_internal_app_secret().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.AuthenticationData.app_secret"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_app_secret(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.AuthenticationData) + return target; +} + +size_t AuthenticationData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.AuthenticationData) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // string app_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_app_id()); + } + + // string app_secret = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_app_secret()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AuthenticationData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.AuthenticationData) + GOOGLE_DCHECK_NE(&from, this); + const AuthenticationData* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.AuthenticationData) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.AuthenticationData) + MergeFrom(*source); + } +} + +void AuthenticationData::MergeFrom(const AuthenticationData& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.AuthenticationData) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_app_id(from._internal_app_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_app_secret(from._internal_app_secret()); + } + } +} + +void AuthenticationData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.AuthenticationData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AuthenticationData::CopyFrom(const AuthenticationData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.AuthenticationData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AuthenticationData::IsInitialized() const { + return true; +} + +void AuthenticationData::InternalSwap(AuthenticationData* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + app_id_.Swap(&other->app_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + app_secret_.Swap(&other->app_secret_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AuthenticationData::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ServerMessage::InitAsDefaultInstance() { + ::appguard_commands::_ServerMessage_default_instance_.update_token_command_.UnsafeSetDefault( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::appguard_commands::_ServerMessage_default_instance_.set_firewall_defaults_ = const_cast< ::appguard_commands::FirewallDefaults*>( + ::appguard_commands::FirewallDefaults::internal_default_instance()); + ::appguard_commands::_ServerMessage_default_instance_.heartbeat_ = const_cast< PROTOBUF_NAMESPACE_ID::Empty*>( + PROTOBUF_NAMESPACE_ID::Empty::internal_default_instance()); + ::appguard_commands::_ServerMessage_default_instance_.device_authorized_ = const_cast< ::appguard_commands::AuthenticationData*>( + ::appguard_commands::AuthenticationData::internal_default_instance()); + ::appguard_commands::_ServerMessage_default_instance_.device_deauthorized_ = const_cast< PROTOBUF_NAMESPACE_ID::Empty*>( + PROTOBUF_NAMESPACE_ID::Empty::internal_default_instance()); + ::appguard_commands::_ServerMessage_default_instance_.authorization_rejected_ = const_cast< PROTOBUF_NAMESPACE_ID::Empty*>( + PROTOBUF_NAMESPACE_ID::Empty::internal_default_instance()); +} +class ServerMessage::_Internal { + public: + static const ::appguard_commands::FirewallDefaults& set_firewall_defaults(const ServerMessage* msg); + static const PROTOBUF_NAMESPACE_ID::Empty& heartbeat(const ServerMessage* msg); + static const ::appguard_commands::AuthenticationData& device_authorized(const ServerMessage* msg); + static const PROTOBUF_NAMESPACE_ID::Empty& device_deauthorized(const ServerMessage* msg); + static const PROTOBUF_NAMESPACE_ID::Empty& authorization_rejected(const ServerMessage* msg); +}; + +const ::appguard_commands::FirewallDefaults& +ServerMessage::_Internal::set_firewall_defaults(const ServerMessage* msg) { + return *msg->message_.set_firewall_defaults_; +} +const PROTOBUF_NAMESPACE_ID::Empty& +ServerMessage::_Internal::heartbeat(const ServerMessage* msg) { + return *msg->message_.heartbeat_; +} +const ::appguard_commands::AuthenticationData& +ServerMessage::_Internal::device_authorized(const ServerMessage* msg) { + return *msg->message_.device_authorized_; +} +const PROTOBUF_NAMESPACE_ID::Empty& +ServerMessage::_Internal::device_deauthorized(const ServerMessage* msg) { + return *msg->message_.device_deauthorized_; +} +const PROTOBUF_NAMESPACE_ID::Empty& +ServerMessage::_Internal::authorization_rejected(const ServerMessage* msg) { + return *msg->message_.authorization_rejected_; +} +void ServerMessage::set_allocated_set_firewall_defaults(::appguard_commands::FirewallDefaults* set_firewall_defaults) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (set_firewall_defaults) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(set_firewall_defaults); + if (message_arena != submessage_arena) { + set_firewall_defaults = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, set_firewall_defaults, submessage_arena); + } + set_has_set_firewall_defaults(); + message_.set_firewall_defaults_ = set_firewall_defaults; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.set_firewall_defaults) +} +void ServerMessage::set_allocated_heartbeat(PROTOBUF_NAMESPACE_ID::Empty* heartbeat) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (heartbeat) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(heartbeat)->GetArena(); + if (message_arena != submessage_arena) { + heartbeat = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, heartbeat, submessage_arena); + } + set_has_heartbeat(); + message_.heartbeat_ = heartbeat; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.heartbeat) +} +void ServerMessage::clear_heartbeat() { + if (_internal_has_heartbeat()) { + if (GetArena() == nullptr) { + delete message_.heartbeat_; + } + clear_has_message(); + } +} +void ServerMessage::set_allocated_device_authorized(::appguard_commands::AuthenticationData* device_authorized) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (device_authorized) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(device_authorized); + if (message_arena != submessage_arena) { + device_authorized = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, device_authorized, submessage_arena); + } + set_has_device_authorized(); + message_.device_authorized_ = device_authorized; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.device_authorized) +} +void ServerMessage::set_allocated_device_deauthorized(PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (device_deauthorized) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_deauthorized)->GetArena(); + if (message_arena != submessage_arena) { + device_deauthorized = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, device_deauthorized, submessage_arena); + } + set_has_device_deauthorized(); + message_.device_deauthorized_ = device_deauthorized; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.device_deauthorized) +} +void ServerMessage::clear_device_deauthorized() { + if (_internal_has_device_deauthorized()) { + if (GetArena() == nullptr) { + delete message_.device_deauthorized_; + } + clear_has_message(); + } +} +void ServerMessage::set_allocated_authorization_rejected(PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + clear_message(); + if (authorization_rejected) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(authorization_rejected)->GetArena(); + if (message_arena != submessage_arena) { + authorization_rejected = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, authorization_rejected, submessage_arena); + } + set_has_authorization_rejected(); + message_.authorization_rejected_ = authorization_rejected; + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.authorization_rejected) +} +void ServerMessage::clear_authorization_rejected() { + if (_internal_has_authorization_rejected()) { + if (GetArena() == nullptr) { + delete message_.authorization_rejected_; + } + clear_has_message(); + } +} +ServerMessage::ServerMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.ServerMessage) +} +ServerMessage::ServerMessage(const ServerMessage& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + clear_has_message(); + switch (from.message_case()) { + case kUpdateTokenCommand: { + _internal_set_update_token_command(from._internal_update_token_command()); + break; + } + case kSetFirewallDefaults: { + _internal_mutable_set_firewall_defaults()->::appguard_commands::FirewallDefaults::MergeFrom(from._internal_set_firewall_defaults()); + break; + } + case kHeartbeat: { + _internal_mutable_heartbeat()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_heartbeat()); + break; + } + case kDeviceAuthorized: { + _internal_mutable_device_authorized()->::appguard_commands::AuthenticationData::MergeFrom(from._internal_device_authorized()); + break; + } + case kDeviceDeauthorized: { + _internal_mutable_device_deauthorized()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_device_deauthorized()); + break; + } + case kAuthorizationRejected: { + _internal_mutable_authorization_rejected()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_authorization_rejected()); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:appguard_commands.ServerMessage) +} + +void ServerMessage::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServerMessage_commands_2eproto.base); + clear_has_message(); +} + +ServerMessage::~ServerMessage() { + // @@protoc_insertion_point(destructor:appguard_commands.ServerMessage) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void ServerMessage::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (has_message()) { + clear_message(); + } +} + +void ServerMessage::ArenaDtor(void* object) { + ServerMessage* _this = reinterpret_cast< ServerMessage* >(object); + (void)_this; +} +void ServerMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ServerMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ServerMessage& ServerMessage::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServerMessage_commands_2eproto.base); + return *internal_default_instance(); +} + + +void ServerMessage::clear_message() { +// @@protoc_insertion_point(one_of_clear_start:appguard_commands.ServerMessage) + switch (message_case()) { + case kUpdateTokenCommand: { + message_.update_token_command_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + break; + } + case kSetFirewallDefaults: { + if (GetArena() == nullptr) { + delete message_.set_firewall_defaults_; + } + break; + } + case kHeartbeat: { + if (GetArena() == nullptr) { + delete message_.heartbeat_; + } + break; + } + case kDeviceAuthorized: { + if (GetArena() == nullptr) { + delete message_.device_authorized_; + } + break; + } + case kDeviceDeauthorized: { + if (GetArena() == nullptr) { + delete message_.device_deauthorized_; + } + break; + } + case kAuthorizationRejected: { + if (GetArena() == nullptr) { + delete message_.authorization_rejected_; + } + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_NOT_SET; +} + + +void ServerMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.ServerMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_message(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ServerMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string update_token_command = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_update_token_command(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "appguard_commands.ServerMessage.update_token_command")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard_commands.FirewallDefaults set_firewall_defaults = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_set_firewall_defaults(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.protobuf.Empty heartbeat = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_heartbeat(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard_commands.AuthenticationData device_authorized = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_device_authorized(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.protobuf.Empty device_deauthorized = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_device_deauthorized(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.protobuf.Empty authorization_rejected = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_authorization_rejected(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* ServerMessage::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.ServerMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string update_token_command = 1; + if (_internal_has_update_token_command()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_update_token_command().data(), static_cast(this->_internal_update_token_command().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "appguard_commands.ServerMessage.update_token_command"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_update_token_command(), target); + } + + // .appguard_commands.FirewallDefaults set_firewall_defaults = 2; + if (_internal_has_set_firewall_defaults()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::set_firewall_defaults(this), target, stream); + } + + // .google.protobuf.Empty heartbeat = 3; + if (_internal_has_heartbeat()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::heartbeat(this), target, stream); + } + + // .appguard_commands.AuthenticationData device_authorized = 4; + if (_internal_has_device_authorized()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::device_authorized(this), target, stream); + } + + // .google.protobuf.Empty device_deauthorized = 5; + if (_internal_has_device_deauthorized()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::device_deauthorized(this), target, stream); + } + + // .google.protobuf.Empty authorization_rejected = 6; + if (_internal_has_authorization_rejected()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 6, _Internal::authorization_rejected(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.ServerMessage) + return target; +} + +size_t ServerMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.ServerMessage) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + switch (message_case()) { + // string update_token_command = 1; + case kUpdateTokenCommand: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_update_token_command()); + break; + } + // .appguard_commands.FirewallDefaults set_firewall_defaults = 2; + case kSetFirewallDefaults: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.set_firewall_defaults_); + break; + } + // .google.protobuf.Empty heartbeat = 3; + case kHeartbeat: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.heartbeat_); + break; + } + // .appguard_commands.AuthenticationData device_authorized = 4; + case kDeviceAuthorized: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.device_authorized_); + break; + } + // .google.protobuf.Empty device_deauthorized = 5; + case kDeviceDeauthorized: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.device_deauthorized_); + break; + } + // .google.protobuf.Empty authorization_rejected = 6; + case kAuthorizationRejected: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *message_.authorization_rejected_); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ServerMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.ServerMessage) + GOOGLE_DCHECK_NE(&from, this); + const ServerMessage* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.ServerMessage) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.ServerMessage) + MergeFrom(*source); + } +} + +void ServerMessage::MergeFrom(const ServerMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.ServerMessage) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + switch (from.message_case()) { + case kUpdateTokenCommand: { + _internal_set_update_token_command(from._internal_update_token_command()); + break; + } + case kSetFirewallDefaults: { + _internal_mutable_set_firewall_defaults()->::appguard_commands::FirewallDefaults::MergeFrom(from._internal_set_firewall_defaults()); + break; + } + case kHeartbeat: { + _internal_mutable_heartbeat()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_heartbeat()); + break; + } + case kDeviceAuthorized: { + _internal_mutable_device_authorized()->::appguard_commands::AuthenticationData::MergeFrom(from._internal_device_authorized()); + break; + } + case kDeviceDeauthorized: { + _internal_mutable_device_deauthorized()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_device_deauthorized()); + break; + } + case kAuthorizationRejected: { + _internal_mutable_authorization_rejected()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_authorization_rejected()); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } +} + +void ServerMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.ServerMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerMessage::CopyFrom(const ServerMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.ServerMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerMessage::IsInitialized() const { + return true; +} + +void ServerMessage::InternalSwap(ServerMessage* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(message_, other->message_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ServerMessage::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void FirewallDefaults::InitAsDefaultInstance() { +} +class FirewallDefaults::_Internal { + public: +}; + +FirewallDefaults::FirewallDefaults(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:appguard_commands.FirewallDefaults) +} +FirewallDefaults::FirewallDefaults(const FirewallDefaults& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&timeout_, &from.timeout_, + static_cast(reinterpret_cast(&policy_) - + reinterpret_cast(&timeout_)) + sizeof(policy_)); + // @@protoc_insertion_point(copy_constructor:appguard_commands.FirewallDefaults) +} + +void FirewallDefaults::SharedCtor() { + ::memset(&timeout_, 0, static_cast( + reinterpret_cast(&policy_) - + reinterpret_cast(&timeout_)) + sizeof(policy_)); +} + +FirewallDefaults::~FirewallDefaults() { + // @@protoc_insertion_point(destructor:appguard_commands.FirewallDefaults) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void FirewallDefaults::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void FirewallDefaults::ArenaDtor(void* object) { + FirewallDefaults* _this = reinterpret_cast< FirewallDefaults* >(object); + (void)_this; +} +void FirewallDefaults::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void FirewallDefaults::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const FirewallDefaults& FirewallDefaults::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FirewallDefaults_commands_2eproto.base); + return *internal_default_instance(); +} + + +void FirewallDefaults::Clear() { +// @@protoc_insertion_point(message_clear_start:appguard_commands.FirewallDefaults) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&timeout_, 0, static_cast( + reinterpret_cast(&policy_) - + reinterpret_cast(&timeout_)) + sizeof(policy_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* FirewallDefaults::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // uint32 timeout = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + timeout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .appguard_commands.FirewallPolicy policy = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_policy(static_cast<::appguard_commands::FirewallPolicy>(val)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* FirewallDefaults::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:appguard_commands.FirewallDefaults) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 timeout = 1; + if (this->timeout() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_timeout(), target); + } + + // .appguard_commands.FirewallPolicy policy = 2; + if (this->policy() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_policy(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:appguard_commands.FirewallDefaults) + return target; +} + +size_t FirewallDefaults::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:appguard_commands.FirewallDefaults) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 timeout = 1; + if (this->timeout() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( + this->_internal_timeout()); + } + + // .appguard_commands.FirewallPolicy policy = 2; + if (this->policy() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_policy()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FirewallDefaults::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:appguard_commands.FirewallDefaults) + GOOGLE_DCHECK_NE(&from, this); + const FirewallDefaults* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:appguard_commands.FirewallDefaults) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:appguard_commands.FirewallDefaults) + MergeFrom(*source); + } +} + +void FirewallDefaults::MergeFrom(const FirewallDefaults& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:appguard_commands.FirewallDefaults) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.timeout() != 0) { + _internal_set_timeout(from._internal_timeout()); + } + if (from.policy() != 0) { + _internal_set_policy(from._internal_policy()); + } +} + +void FirewallDefaults::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:appguard_commands.FirewallDefaults) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FirewallDefaults::CopyFrom(const FirewallDefaults& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:appguard_commands.FirewallDefaults) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FirewallDefaults::IsInitialized() const { + return true; +} + +void FirewallDefaults::InternalSwap(FirewallDefaults* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FirewallDefaults, policy_) + + sizeof(FirewallDefaults::policy_) + - PROTOBUF_FIELD_OFFSET(FirewallDefaults, timeout_)>( + reinterpret_cast(&timeout_), + reinterpret_cast(&other->timeout_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata FirewallDefaults::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace appguard_commands +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::appguard_commands::AuthorizationRequest* Arena::CreateMaybeMessage< ::appguard_commands::AuthorizationRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::AuthorizationRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard_commands::Authentication* Arena::CreateMaybeMessage< ::appguard_commands::Authentication >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::Authentication >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard_commands::ClientMessage* Arena::CreateMaybeMessage< ::appguard_commands::ClientMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::ClientMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard_commands::AuthenticationData* Arena::CreateMaybeMessage< ::appguard_commands::AuthenticationData >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::AuthenticationData >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard_commands::ServerMessage* Arena::CreateMaybeMessage< ::appguard_commands::ServerMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::ServerMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::appguard_commands::FirewallDefaults* Arena::CreateMaybeMessage< ::appguard_commands::FirewallDefaults >(Arena* arena) { + return Arena::CreateMessageInternal< ::appguard_commands::FirewallDefaults >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/generated/commands.pb.h b/src/generated/commands.pb.h new file mode 100644 index 0000000..ddb4d1f --- /dev/null +++ b/src/generated/commands.pb.h @@ -0,0 +1,2844 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_commands_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_commands_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3012000 +#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 3012004 < 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 +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_commands_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_commands_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[6] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_commands_2eproto; +namespace appguard_commands { +class Authentication; +class AuthenticationDefaultTypeInternal; +extern AuthenticationDefaultTypeInternal _Authentication_default_instance_; +class AuthenticationData; +class AuthenticationDataDefaultTypeInternal; +extern AuthenticationDataDefaultTypeInternal _AuthenticationData_default_instance_; +class AuthorizationRequest; +class AuthorizationRequestDefaultTypeInternal; +extern AuthorizationRequestDefaultTypeInternal _AuthorizationRequest_default_instance_; +class ClientMessage; +class ClientMessageDefaultTypeInternal; +extern ClientMessageDefaultTypeInternal _ClientMessage_default_instance_; +class FirewallDefaults; +class FirewallDefaultsDefaultTypeInternal; +extern FirewallDefaultsDefaultTypeInternal _FirewallDefaults_default_instance_; +class ServerMessage; +class ServerMessageDefaultTypeInternal; +extern ServerMessageDefaultTypeInternal _ServerMessage_default_instance_; +} // namespace appguard_commands +PROTOBUF_NAMESPACE_OPEN +template<> ::appguard_commands::Authentication* Arena::CreateMaybeMessage<::appguard_commands::Authentication>(Arena*); +template<> ::appguard_commands::AuthenticationData* Arena::CreateMaybeMessage<::appguard_commands::AuthenticationData>(Arena*); +template<> ::appguard_commands::AuthorizationRequest* Arena::CreateMaybeMessage<::appguard_commands::AuthorizationRequest>(Arena*); +template<> ::appguard_commands::ClientMessage* Arena::CreateMaybeMessage<::appguard_commands::ClientMessage>(Arena*); +template<> ::appguard_commands::FirewallDefaults* Arena::CreateMaybeMessage<::appguard_commands::FirewallDefaults>(Arena*); +template<> ::appguard_commands::ServerMessage* Arena::CreateMaybeMessage<::appguard_commands::ServerMessage>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace appguard_commands { + +enum FirewallPolicy : int { + UNKNOWN = 0, + ALLOW = 1, + DENY = 2, + FirewallPolicy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + FirewallPolicy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool FirewallPolicy_IsValid(int value); +constexpr FirewallPolicy FirewallPolicy_MIN = UNKNOWN; +constexpr FirewallPolicy FirewallPolicy_MAX = DENY; +constexpr int FirewallPolicy_ARRAYSIZE = FirewallPolicy_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FirewallPolicy_descriptor(); +template +inline const std::string& FirewallPolicy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FirewallPolicy_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + FirewallPolicy_descriptor(), enum_t_value); +} +inline bool FirewallPolicy_Parse( + const std::string& name, FirewallPolicy* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + FirewallPolicy_descriptor(), name, value); +} +// =================================================================== + +class AuthorizationRequest PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.AuthorizationRequest) */ { + public: + inline AuthorizationRequest() : AuthorizationRequest(nullptr) {}; + virtual ~AuthorizationRequest(); + + AuthorizationRequest(const AuthorizationRequest& from); + AuthorizationRequest(AuthorizationRequest&& from) noexcept + : AuthorizationRequest() { + *this = ::std::move(from); + } + + inline AuthorizationRequest& operator=(const AuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline AuthorizationRequest& operator=(AuthorizationRequest&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AuthorizationRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_AuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(AuthorizationRequest& a, AuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(AuthorizationRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AuthorizationRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AuthorizationRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + AuthorizationRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AuthorizationRequest& from); + void MergeFrom(const AuthorizationRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AuthorizationRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.AuthorizationRequest"; + } + protected: + explicit AuthorizationRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUuidFieldNumber = 1, + kCodeFieldNumber = 2, + kCategoryFieldNumber = 3, + kTypeFieldNumber = 4, + kTargetOsFieldNumber = 5, + }; + // string uuid = 1; + void clear_uuid(); + const std::string& uuid() const; + void set_uuid(const std::string& value); + void set_uuid(std::string&& value); + void set_uuid(const char* value); + void set_uuid(const char* value, size_t size); + std::string* mutable_uuid(); + std::string* release_uuid(); + void set_allocated_uuid(std::string* uuid); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_uuid(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_uuid( + std::string* uuid); + private: + const std::string& _internal_uuid() const; + void _internal_set_uuid(const std::string& value); + std::string* _internal_mutable_uuid(); + public: + + // string code = 2; + void clear_code(); + const std::string& code() const; + void set_code(const std::string& value); + void set_code(std::string&& value); + void set_code(const char* value); + void set_code(const char* value, size_t size); + std::string* mutable_code(); + std::string* release_code(); + void set_allocated_code(std::string* code); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_code(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_code( + std::string* code); + private: + const std::string& _internal_code() const; + void _internal_set_code(const std::string& value); + std::string* _internal_mutable_code(); + public: + + // string category = 3; + void clear_category(); + const std::string& category() const; + void set_category(const std::string& value); + void set_category(std::string&& value); + void set_category(const char* value); + void set_category(const char* value, size_t size); + std::string* mutable_category(); + std::string* release_category(); + void set_allocated_category(std::string* category); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_category(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_category( + std::string* category); + private: + const std::string& _internal_category() const; + void _internal_set_category(const std::string& value); + std::string* _internal_mutable_category(); + public: + + // string type = 4; + void clear_type(); + const std::string& type() const; + void set_type(const std::string& value); + void set_type(std::string&& value); + 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); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_type(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_type( + std::string* type); + private: + const std::string& _internal_type() const; + void _internal_set_type(const std::string& value); + std::string* _internal_mutable_type(); + public: + + // string target_os = 5; + void clear_target_os(); + const std::string& target_os() const; + void set_target_os(const std::string& value); + void set_target_os(std::string&& value); + void set_target_os(const char* value); + void set_target_os(const char* value, size_t size); + std::string* mutable_target_os(); + std::string* release_target_os(); + void set_allocated_target_os(std::string* target_os); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_target_os(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_target_os( + std::string* target_os); + private: + const std::string& _internal_target_os() const; + void _internal_set_target_os(const std::string& value); + std::string* _internal_mutable_target_os(); + public: + + // @@protoc_insertion_point(class_scope:appguard_commands.AuthorizationRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr uuid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr code_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr category_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr target_os_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_commands_2eproto; +}; +// ------------------------------------------------------------------- + +class Authentication PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.Authentication) */ { + public: + inline Authentication() : Authentication(nullptr) {}; + virtual ~Authentication(); + + Authentication(const Authentication& from); + Authentication(Authentication&& from) noexcept + : Authentication() { + *this = ::std::move(from); + } + + inline Authentication& operator=(const Authentication& from) { + CopyFrom(from); + return *this; + } + inline Authentication& operator=(Authentication&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Authentication& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Authentication* internal_default_instance() { + return reinterpret_cast( + &_Authentication_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Authentication& a, Authentication& b) { + a.Swap(&b); + } + inline void Swap(Authentication* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Authentication* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Authentication* New() const final { + return CreateMaybeMessage(nullptr); + } + + Authentication* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Authentication& from); + void MergeFrom(const Authentication& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Authentication* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.Authentication"; + } + protected: + explicit Authentication(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIdFieldNumber = 1, + kAppSecretFieldNumber = 2, + }; + // string app_id = 1; + void clear_app_id(); + const std::string& app_id() const; + void set_app_id(const std::string& value); + void set_app_id(std::string&& value); + void set_app_id(const char* value); + void set_app_id(const char* value, size_t size); + std::string* mutable_app_id(); + std::string* release_app_id(); + void set_allocated_app_id(std::string* app_id); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_app_id(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_app_id( + std::string* app_id); + private: + const std::string& _internal_app_id() const; + void _internal_set_app_id(const std::string& value); + std::string* _internal_mutable_app_id(); + public: + + // string app_secret = 2; + void clear_app_secret(); + const std::string& app_secret() const; + void set_app_secret(const std::string& value); + void set_app_secret(std::string&& value); + void set_app_secret(const char* value); + void set_app_secret(const char* value, size_t size); + std::string* mutable_app_secret(); + std::string* release_app_secret(); + void set_allocated_app_secret(std::string* app_secret); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_app_secret(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_app_secret( + std::string* app_secret); + private: + const std::string& _internal_app_secret() const; + void _internal_set_app_secret(const std::string& value); + std::string* _internal_mutable_app_secret(); + public: + + // @@protoc_insertion_point(class_scope:appguard_commands.Authentication) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_secret_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_commands_2eproto; +}; +// ------------------------------------------------------------------- + +class ClientMessage PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.ClientMessage) */ { + public: + inline ClientMessage() : ClientMessage(nullptr) {}; + virtual ~ClientMessage(); + + ClientMessage(const ClientMessage& from); + ClientMessage(ClientMessage&& from) noexcept + : ClientMessage() { + *this = ::std::move(from); + } + + inline ClientMessage& operator=(const ClientMessage& from) { + CopyFrom(from); + return *this; + } + inline ClientMessage& operator=(ClientMessage&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ClientMessage& default_instance(); + + enum MessageCase { + kAuthorizationRequest = 1, + kAuthentication = 2, + MESSAGE_NOT_SET = 0, + }; + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ClientMessage* internal_default_instance() { + return reinterpret_cast( + &_ClientMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ClientMessage& a, ClientMessage& b) { + a.Swap(&b); + } + inline void Swap(ClientMessage* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ClientMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ClientMessage* New() const final { + return CreateMaybeMessage(nullptr); + } + + ClientMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ClientMessage& from); + void MergeFrom(const ClientMessage& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ClientMessage* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.ClientMessage"; + } + protected: + explicit ClientMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAuthorizationRequestFieldNumber = 1, + kAuthenticationFieldNumber = 2, + }; + // .appguard_commands.AuthorizationRequest authorization_request = 1; + bool has_authorization_request() const; + private: + bool _internal_has_authorization_request() const; + public: + void clear_authorization_request(); + const ::appguard_commands::AuthorizationRequest& authorization_request() const; + ::appguard_commands::AuthorizationRequest* release_authorization_request(); + ::appguard_commands::AuthorizationRequest* mutable_authorization_request(); + void set_allocated_authorization_request(::appguard_commands::AuthorizationRequest* authorization_request); + private: + const ::appguard_commands::AuthorizationRequest& _internal_authorization_request() const; + ::appguard_commands::AuthorizationRequest* _internal_mutable_authorization_request(); + public: + void unsafe_arena_set_allocated_authorization_request( + ::appguard_commands::AuthorizationRequest* authorization_request); + ::appguard_commands::AuthorizationRequest* unsafe_arena_release_authorization_request(); + + // .appguard_commands.Authentication authentication = 2; + bool has_authentication() const; + private: + bool _internal_has_authentication() const; + public: + void clear_authentication(); + const ::appguard_commands::Authentication& authentication() const; + ::appguard_commands::Authentication* release_authentication(); + ::appguard_commands::Authentication* mutable_authentication(); + void set_allocated_authentication(::appguard_commands::Authentication* authentication); + private: + const ::appguard_commands::Authentication& _internal_authentication() const; + ::appguard_commands::Authentication* _internal_mutable_authentication(); + public: + void unsafe_arena_set_allocated_authentication( + ::appguard_commands::Authentication* authentication); + ::appguard_commands::Authentication* unsafe_arena_release_authentication(); + + void clear_message(); + MessageCase message_case() const; + // @@protoc_insertion_point(class_scope:appguard_commands.ClientMessage) + private: + class _Internal; + void set_has_authorization_request(); + void set_has_authentication(); + + inline bool has_message() const; + inline void clear_has_message(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + union MessageUnion { + MessageUnion() {} + ::appguard_commands::AuthorizationRequest* authorization_request_; + ::appguard_commands::Authentication* authentication_; + } message_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + + friend struct ::TableStruct_commands_2eproto; +}; +// ------------------------------------------------------------------- + +class AuthenticationData PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.AuthenticationData) */ { + public: + inline AuthenticationData() : AuthenticationData(nullptr) {}; + virtual ~AuthenticationData(); + + AuthenticationData(const AuthenticationData& from); + AuthenticationData(AuthenticationData&& from) noexcept + : AuthenticationData() { + *this = ::std::move(from); + } + + inline AuthenticationData& operator=(const AuthenticationData& from) { + CopyFrom(from); + return *this; + } + inline AuthenticationData& operator=(AuthenticationData&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const AuthenticationData& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AuthenticationData* internal_default_instance() { + return reinterpret_cast( + &_AuthenticationData_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(AuthenticationData& a, AuthenticationData& b) { + a.Swap(&b); + } + inline void Swap(AuthenticationData* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AuthenticationData* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline AuthenticationData* New() const final { + return CreateMaybeMessage(nullptr); + } + + AuthenticationData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const AuthenticationData& from); + void MergeFrom(const AuthenticationData& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AuthenticationData* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.AuthenticationData"; + } + protected: + explicit AuthenticationData(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAppIdFieldNumber = 1, + kAppSecretFieldNumber = 2, + }; + // string app_id = 1; + bool has_app_id() const; + private: + bool _internal_has_app_id() const; + public: + void clear_app_id(); + const std::string& app_id() const; + void set_app_id(const std::string& value); + void set_app_id(std::string&& value); + void set_app_id(const char* value); + void set_app_id(const char* value, size_t size); + std::string* mutable_app_id(); + std::string* release_app_id(); + void set_allocated_app_id(std::string* app_id); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_app_id(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_app_id( + std::string* app_id); + private: + const std::string& _internal_app_id() const; + void _internal_set_app_id(const std::string& value); + std::string* _internal_mutable_app_id(); + public: + + // string app_secret = 2; + bool has_app_secret() const; + private: + bool _internal_has_app_secret() const; + public: + void clear_app_secret(); + const std::string& app_secret() const; + void set_app_secret(const std::string& value); + void set_app_secret(std::string&& value); + void set_app_secret(const char* value); + void set_app_secret(const char* value, size_t size); + std::string* mutable_app_secret(); + std::string* release_app_secret(); + void set_allocated_app_secret(std::string* app_secret); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_app_secret(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_app_secret( + std::string* app_secret); + private: + const std::string& _internal_app_secret() const; + void _internal_set_app_secret(const std::string& value); + std::string* _internal_mutable_app_secret(); + public: + + // @@protoc_insertion_point(class_scope:appguard_commands.AuthenticationData) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr app_secret_; + friend struct ::TableStruct_commands_2eproto; +}; +// ------------------------------------------------------------------- + +class ServerMessage PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.ServerMessage) */ { + public: + inline ServerMessage() : ServerMessage(nullptr) {}; + virtual ~ServerMessage(); + + ServerMessage(const ServerMessage& from); + ServerMessage(ServerMessage&& from) noexcept + : ServerMessage() { + *this = ::std::move(from); + } + + inline ServerMessage& operator=(const ServerMessage& from) { + CopyFrom(from); + return *this; + } + inline ServerMessage& operator=(ServerMessage&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ServerMessage& default_instance(); + + enum MessageCase { + kUpdateTokenCommand = 1, + kSetFirewallDefaults = 2, + kHeartbeat = 3, + kDeviceAuthorized = 4, + kDeviceDeauthorized = 5, + kAuthorizationRejected = 6, + MESSAGE_NOT_SET = 0, + }; + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ServerMessage* internal_default_instance() { + return reinterpret_cast( + &_ServerMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(ServerMessage& a, ServerMessage& b) { + a.Swap(&b); + } + inline void Swap(ServerMessage* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServerMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ServerMessage* New() const final { + return CreateMaybeMessage(nullptr); + } + + ServerMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ServerMessage& from); + void MergeFrom(const ServerMessage& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ServerMessage* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.ServerMessage"; + } + protected: + explicit ServerMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUpdateTokenCommandFieldNumber = 1, + kSetFirewallDefaultsFieldNumber = 2, + kHeartbeatFieldNumber = 3, + kDeviceAuthorizedFieldNumber = 4, + kDeviceDeauthorizedFieldNumber = 5, + kAuthorizationRejectedFieldNumber = 6, + }; + // string update_token_command = 1; + private: + bool _internal_has_update_token_command() const; + public: + void clear_update_token_command(); + const std::string& update_token_command() const; + void set_update_token_command(const std::string& value); + void set_update_token_command(std::string&& value); + void set_update_token_command(const char* value); + void set_update_token_command(const char* value, size_t size); + std::string* mutable_update_token_command(); + std::string* release_update_token_command(); + void set_allocated_update_token_command(std::string* update_token_command); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_update_token_command(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_update_token_command( + std::string* update_token_command); + private: + const std::string& _internal_update_token_command() const; + void _internal_set_update_token_command(const std::string& value); + std::string* _internal_mutable_update_token_command(); + public: + + // .appguard_commands.FirewallDefaults set_firewall_defaults = 2; + bool has_set_firewall_defaults() const; + private: + bool _internal_has_set_firewall_defaults() const; + public: + void clear_set_firewall_defaults(); + const ::appguard_commands::FirewallDefaults& set_firewall_defaults() const; + ::appguard_commands::FirewallDefaults* release_set_firewall_defaults(); + ::appguard_commands::FirewallDefaults* mutable_set_firewall_defaults(); + void set_allocated_set_firewall_defaults(::appguard_commands::FirewallDefaults* set_firewall_defaults); + private: + const ::appguard_commands::FirewallDefaults& _internal_set_firewall_defaults() const; + ::appguard_commands::FirewallDefaults* _internal_mutable_set_firewall_defaults(); + public: + void unsafe_arena_set_allocated_set_firewall_defaults( + ::appguard_commands::FirewallDefaults* set_firewall_defaults); + ::appguard_commands::FirewallDefaults* unsafe_arena_release_set_firewall_defaults(); + + // .google.protobuf.Empty heartbeat = 3; + bool has_heartbeat() const; + private: + bool _internal_has_heartbeat() const; + public: + void clear_heartbeat(); + const PROTOBUF_NAMESPACE_ID::Empty& heartbeat() const; + PROTOBUF_NAMESPACE_ID::Empty* release_heartbeat(); + PROTOBUF_NAMESPACE_ID::Empty* mutable_heartbeat(); + void set_allocated_heartbeat(PROTOBUF_NAMESPACE_ID::Empty* heartbeat); + private: + const PROTOBUF_NAMESPACE_ID::Empty& _internal_heartbeat() const; + PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_heartbeat(); + public: + void unsafe_arena_set_allocated_heartbeat( + PROTOBUF_NAMESPACE_ID::Empty* heartbeat); + PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_heartbeat(); + + // .appguard_commands.AuthenticationData device_authorized = 4; + bool has_device_authorized() const; + private: + bool _internal_has_device_authorized() const; + public: + void clear_device_authorized(); + const ::appguard_commands::AuthenticationData& device_authorized() const; + ::appguard_commands::AuthenticationData* release_device_authorized(); + ::appguard_commands::AuthenticationData* mutable_device_authorized(); + void set_allocated_device_authorized(::appguard_commands::AuthenticationData* device_authorized); + private: + const ::appguard_commands::AuthenticationData& _internal_device_authorized() const; + ::appguard_commands::AuthenticationData* _internal_mutable_device_authorized(); + public: + void unsafe_arena_set_allocated_device_authorized( + ::appguard_commands::AuthenticationData* device_authorized); + ::appguard_commands::AuthenticationData* unsafe_arena_release_device_authorized(); + + // .google.protobuf.Empty device_deauthorized = 5; + bool has_device_deauthorized() const; + private: + bool _internal_has_device_deauthorized() const; + public: + void clear_device_deauthorized(); + const PROTOBUF_NAMESPACE_ID::Empty& device_deauthorized() const; + PROTOBUF_NAMESPACE_ID::Empty* release_device_deauthorized(); + PROTOBUF_NAMESPACE_ID::Empty* mutable_device_deauthorized(); + void set_allocated_device_deauthorized(PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized); + private: + const PROTOBUF_NAMESPACE_ID::Empty& _internal_device_deauthorized() const; + PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_device_deauthorized(); + public: + void unsafe_arena_set_allocated_device_deauthorized( + PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized); + PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_device_deauthorized(); + + // .google.protobuf.Empty authorization_rejected = 6; + bool has_authorization_rejected() const; + private: + bool _internal_has_authorization_rejected() const; + public: + void clear_authorization_rejected(); + const PROTOBUF_NAMESPACE_ID::Empty& authorization_rejected() const; + PROTOBUF_NAMESPACE_ID::Empty* release_authorization_rejected(); + PROTOBUF_NAMESPACE_ID::Empty* mutable_authorization_rejected(); + void set_allocated_authorization_rejected(PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected); + private: + const PROTOBUF_NAMESPACE_ID::Empty& _internal_authorization_rejected() const; + PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_authorization_rejected(); + public: + void unsafe_arena_set_allocated_authorization_rejected( + PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected); + PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_authorization_rejected(); + + void clear_message(); + MessageCase message_case() const; + // @@protoc_insertion_point(class_scope:appguard_commands.ServerMessage) + private: + class _Internal; + void set_has_update_token_command(); + void set_has_set_firewall_defaults(); + void set_has_heartbeat(); + void set_has_device_authorized(); + void set_has_device_deauthorized(); + void set_has_authorization_rejected(); + + inline bool has_message() const; + inline void clear_has_message(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + union MessageUnion { + MessageUnion() {} + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr update_token_command_; + ::appguard_commands::FirewallDefaults* set_firewall_defaults_; + PROTOBUF_NAMESPACE_ID::Empty* heartbeat_; + ::appguard_commands::AuthenticationData* device_authorized_; + PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized_; + PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected_; + } message_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + + friend struct ::TableStruct_commands_2eproto; +}; +// ------------------------------------------------------------------- + +class FirewallDefaults PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:appguard_commands.FirewallDefaults) */ { + public: + inline FirewallDefaults() : FirewallDefaults(nullptr) {}; + virtual ~FirewallDefaults(); + + FirewallDefaults(const FirewallDefaults& from); + FirewallDefaults(FirewallDefaults&& from) noexcept + : FirewallDefaults() { + *this = ::std::move(from); + } + + inline FirewallDefaults& operator=(const FirewallDefaults& from) { + CopyFrom(from); + return *this; + } + inline FirewallDefaults& operator=(FirewallDefaults&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const FirewallDefaults& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const FirewallDefaults* internal_default_instance() { + return reinterpret_cast( + &_FirewallDefaults_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(FirewallDefaults& a, FirewallDefaults& b) { + a.Swap(&b); + } + inline void Swap(FirewallDefaults* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FirewallDefaults* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline FirewallDefaults* New() const final { + return CreateMaybeMessage(nullptr); + } + + FirewallDefaults* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const FirewallDefaults& from); + void MergeFrom(const FirewallDefaults& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FirewallDefaults* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "appguard_commands.FirewallDefaults"; + } + protected: + explicit FirewallDefaults(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_commands_2eproto); + return ::descriptor_table_commands_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTimeoutFieldNumber = 1, + kPolicyFieldNumber = 2, + }; + // uint32 timeout = 1; + void clear_timeout(); + ::PROTOBUF_NAMESPACE_ID::uint32 timeout() const; + void set_timeout(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_timeout() const; + void _internal_set_timeout(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // .appguard_commands.FirewallPolicy policy = 2; + void clear_policy(); + ::appguard_commands::FirewallPolicy policy() const; + void set_policy(::appguard_commands::FirewallPolicy value); + private: + ::appguard_commands::FirewallPolicy _internal_policy() const; + void _internal_set_policy(::appguard_commands::FirewallPolicy value); + public: + + // @@protoc_insertion_point(class_scope:appguard_commands.FirewallDefaults) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::uint32 timeout_; + int policy_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_commands_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AuthorizationRequest + +// string uuid = 1; +inline void AuthorizationRequest::clear_uuid() { + uuid_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AuthorizationRequest::uuid() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthorizationRequest.uuid) + return _internal_uuid(); +} +inline void AuthorizationRequest::set_uuid(const std::string& value) { + _internal_set_uuid(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthorizationRequest.uuid) +} +inline std::string* AuthorizationRequest::mutable_uuid() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthorizationRequest.uuid) + return _internal_mutable_uuid(); +} +inline const std::string& AuthorizationRequest::_internal_uuid() const { + return uuid_.Get(); +} +inline void AuthorizationRequest::_internal_set_uuid(const std::string& value) { + + uuid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthorizationRequest::set_uuid(std::string&& value) { + + uuid_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthorizationRequest.uuid) +} +inline void AuthorizationRequest::set_uuid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + uuid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthorizationRequest.uuid) +} +inline void AuthorizationRequest::set_uuid(const char* value, + size_t size) { + + uuid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthorizationRequest.uuid) +} +inline std::string* AuthorizationRequest::_internal_mutable_uuid() { + + return uuid_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthorizationRequest::release_uuid() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthorizationRequest.uuid) + return uuid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthorizationRequest::set_allocated_uuid(std::string* uuid) { + if (uuid != nullptr) { + + } else { + + } + uuid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), uuid, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthorizationRequest.uuid) +} +inline std::string* AuthorizationRequest::unsafe_arena_release_uuid() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthorizationRequest.uuid) + GOOGLE_DCHECK(GetArena() != nullptr); + + return uuid_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthorizationRequest::unsafe_arena_set_allocated_uuid( + std::string* uuid) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (uuid != nullptr) { + + } else { + + } + uuid_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + uuid, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthorizationRequest.uuid) +} + +// string code = 2; +inline void AuthorizationRequest::clear_code() { + code_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AuthorizationRequest::code() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthorizationRequest.code) + return _internal_code(); +} +inline void AuthorizationRequest::set_code(const std::string& value) { + _internal_set_code(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthorizationRequest.code) +} +inline std::string* AuthorizationRequest::mutable_code() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthorizationRequest.code) + return _internal_mutable_code(); +} +inline const std::string& AuthorizationRequest::_internal_code() const { + return code_.Get(); +} +inline void AuthorizationRequest::_internal_set_code(const std::string& value) { + + code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthorizationRequest::set_code(std::string&& value) { + + code_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthorizationRequest.code) +} +inline void AuthorizationRequest::set_code(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthorizationRequest.code) +} +inline void AuthorizationRequest::set_code(const char* value, + size_t size) { + + code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthorizationRequest.code) +} +inline std::string* AuthorizationRequest::_internal_mutable_code() { + + return code_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthorizationRequest::release_code() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthorizationRequest.code) + return code_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthorizationRequest::set_allocated_code(std::string* code) { + if (code != nullptr) { + + } else { + + } + code_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), code, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthorizationRequest.code) +} +inline std::string* AuthorizationRequest::unsafe_arena_release_code() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthorizationRequest.code) + GOOGLE_DCHECK(GetArena() != nullptr); + + return code_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthorizationRequest::unsafe_arena_set_allocated_code( + std::string* code) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (code != nullptr) { + + } else { + + } + code_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + code, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthorizationRequest.code) +} + +// string category = 3; +inline void AuthorizationRequest::clear_category() { + category_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AuthorizationRequest::category() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthorizationRequest.category) + return _internal_category(); +} +inline void AuthorizationRequest::set_category(const std::string& value) { + _internal_set_category(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthorizationRequest.category) +} +inline std::string* AuthorizationRequest::mutable_category() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthorizationRequest.category) + return _internal_mutable_category(); +} +inline const std::string& AuthorizationRequest::_internal_category() const { + return category_.Get(); +} +inline void AuthorizationRequest::_internal_set_category(const std::string& value) { + + category_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthorizationRequest::set_category(std::string&& value) { + + category_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthorizationRequest.category) +} +inline void AuthorizationRequest::set_category(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + category_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthorizationRequest.category) +} +inline void AuthorizationRequest::set_category(const char* value, + size_t size) { + + category_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthorizationRequest.category) +} +inline std::string* AuthorizationRequest::_internal_mutable_category() { + + return category_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthorizationRequest::release_category() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthorizationRequest.category) + return category_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthorizationRequest::set_allocated_category(std::string* category) { + if (category != nullptr) { + + } else { + + } + category_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), category, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthorizationRequest.category) +} +inline std::string* AuthorizationRequest::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthorizationRequest.category) + GOOGLE_DCHECK(GetArena() != nullptr); + + return category_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthorizationRequest::unsafe_arena_set_allocated_category( + std::string* category) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (category != nullptr) { + + } else { + + } + category_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + category, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthorizationRequest.category) +} + +// string type = 4; +inline void AuthorizationRequest::clear_type() { + type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AuthorizationRequest::type() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthorizationRequest.type) + return _internal_type(); +} +inline void AuthorizationRequest::set_type(const std::string& value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthorizationRequest.type) +} +inline std::string* AuthorizationRequest::mutable_type() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthorizationRequest.type) + return _internal_mutable_type(); +} +inline const std::string& AuthorizationRequest::_internal_type() const { + return type_.Get(); +} +inline void AuthorizationRequest::_internal_set_type(const std::string& value) { + + type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthorizationRequest::set_type(std::string&& value) { + + type_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthorizationRequest.type) +} +inline void AuthorizationRequest::set_type(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthorizationRequest.type) +} +inline void AuthorizationRequest::set_type(const char* value, + size_t size) { + + type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthorizationRequest.type) +} +inline std::string* AuthorizationRequest::_internal_mutable_type() { + + return type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthorizationRequest::release_type() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthorizationRequest.type) + return type_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthorizationRequest::set_allocated_type(std::string* type) { + if (type != nullptr) { + + } else { + + } + type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthorizationRequest.type) +} +inline std::string* AuthorizationRequest::unsafe_arena_release_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthorizationRequest.type) + GOOGLE_DCHECK(GetArena() != nullptr); + + return type_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthorizationRequest::unsafe_arena_set_allocated_type( + std::string* type) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (type != nullptr) { + + } else { + + } + type_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + type, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthorizationRequest.type) +} + +// string target_os = 5; +inline void AuthorizationRequest::clear_target_os() { + target_os_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& AuthorizationRequest::target_os() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthorizationRequest.target_os) + return _internal_target_os(); +} +inline void AuthorizationRequest::set_target_os(const std::string& value) { + _internal_set_target_os(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthorizationRequest.target_os) +} +inline std::string* AuthorizationRequest::mutable_target_os() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthorizationRequest.target_os) + return _internal_mutable_target_os(); +} +inline const std::string& AuthorizationRequest::_internal_target_os() const { + return target_os_.Get(); +} +inline void AuthorizationRequest::_internal_set_target_os(const std::string& value) { + + target_os_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthorizationRequest::set_target_os(std::string&& value) { + + target_os_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthorizationRequest.target_os) +} +inline void AuthorizationRequest::set_target_os(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + target_os_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthorizationRequest.target_os) +} +inline void AuthorizationRequest::set_target_os(const char* value, + size_t size) { + + target_os_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthorizationRequest.target_os) +} +inline std::string* AuthorizationRequest::_internal_mutable_target_os() { + + return target_os_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthorizationRequest::release_target_os() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthorizationRequest.target_os) + return target_os_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthorizationRequest::set_allocated_target_os(std::string* target_os) { + if (target_os != nullptr) { + + } else { + + } + target_os_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), target_os, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthorizationRequest.target_os) +} +inline std::string* AuthorizationRequest::unsafe_arena_release_target_os() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthorizationRequest.target_os) + GOOGLE_DCHECK(GetArena() != nullptr); + + return target_os_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthorizationRequest::unsafe_arena_set_allocated_target_os( + std::string* target_os) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (target_os != nullptr) { + + } else { + + } + target_os_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + target_os, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthorizationRequest.target_os) +} + +// ------------------------------------------------------------------- + +// Authentication + +// string app_id = 1; +inline void Authentication::clear_app_id() { + app_id_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Authentication::app_id() const { + // @@protoc_insertion_point(field_get:appguard_commands.Authentication.app_id) + return _internal_app_id(); +} +inline void Authentication::set_app_id(const std::string& value) { + _internal_set_app_id(value); + // @@protoc_insertion_point(field_set:appguard_commands.Authentication.app_id) +} +inline std::string* Authentication::mutable_app_id() { + // @@protoc_insertion_point(field_mutable:appguard_commands.Authentication.app_id) + return _internal_mutable_app_id(); +} +inline const std::string& Authentication::_internal_app_id() const { + return app_id_.Get(); +} +inline void Authentication::_internal_set_app_id(const std::string& value) { + + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Authentication::set_app_id(std::string&& value) { + + app_id_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.Authentication.app_id) +} +inline void Authentication::set_app_id(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.Authentication.app_id) +} +inline void Authentication::set_app_id(const char* value, + size_t size) { + + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.Authentication.app_id) +} +inline std::string* Authentication::_internal_mutable_app_id() { + + return app_id_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Authentication::release_app_id() { + // @@protoc_insertion_point(field_release:appguard_commands.Authentication.app_id) + return app_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Authentication::set_allocated_app_id(std::string* app_id) { + if (app_id != nullptr) { + + } else { + + } + app_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), app_id, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.Authentication.app_id) +} +inline std::string* Authentication::unsafe_arena_release_app_id() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.Authentication.app_id) + GOOGLE_DCHECK(GetArena() != nullptr); + + return app_id_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Authentication::unsafe_arena_set_allocated_app_id( + std::string* app_id) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (app_id != nullptr) { + + } else { + + } + app_id_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + app_id, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.Authentication.app_id) +} + +// string app_secret = 2; +inline void Authentication::clear_app_secret() { + app_secret_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Authentication::app_secret() const { + // @@protoc_insertion_point(field_get:appguard_commands.Authentication.app_secret) + return _internal_app_secret(); +} +inline void Authentication::set_app_secret(const std::string& value) { + _internal_set_app_secret(value); + // @@protoc_insertion_point(field_set:appguard_commands.Authentication.app_secret) +} +inline std::string* Authentication::mutable_app_secret() { + // @@protoc_insertion_point(field_mutable:appguard_commands.Authentication.app_secret) + return _internal_mutable_app_secret(); +} +inline const std::string& Authentication::_internal_app_secret() const { + return app_secret_.Get(); +} +inline void Authentication::_internal_set_app_secret(const std::string& value) { + + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Authentication::set_app_secret(std::string&& value) { + + app_secret_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.Authentication.app_secret) +} +inline void Authentication::set_app_secret(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.Authentication.app_secret) +} +inline void Authentication::set_app_secret(const char* value, + size_t size) { + + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.Authentication.app_secret) +} +inline std::string* Authentication::_internal_mutable_app_secret() { + + return app_secret_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Authentication::release_app_secret() { + // @@protoc_insertion_point(field_release:appguard_commands.Authentication.app_secret) + return app_secret_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Authentication::set_allocated_app_secret(std::string* app_secret) { + if (app_secret != nullptr) { + + } else { + + } + app_secret_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), app_secret, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.Authentication.app_secret) +} +inline std::string* Authentication::unsafe_arena_release_app_secret() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.Authentication.app_secret) + GOOGLE_DCHECK(GetArena() != nullptr); + + return app_secret_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Authentication::unsafe_arena_set_allocated_app_secret( + std::string* app_secret) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (app_secret != nullptr) { + + } else { + + } + app_secret_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + app_secret, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.Authentication.app_secret) +} + +// ------------------------------------------------------------------- + +// ClientMessage + +// .appguard_commands.AuthorizationRequest authorization_request = 1; +inline bool ClientMessage::_internal_has_authorization_request() const { + return message_case() == kAuthorizationRequest; +} +inline bool ClientMessage::has_authorization_request() const { + return _internal_has_authorization_request(); +} +inline void ClientMessage::set_has_authorization_request() { + _oneof_case_[0] = kAuthorizationRequest; +} +inline void ClientMessage::clear_authorization_request() { + if (_internal_has_authorization_request()) { + if (GetArena() == nullptr) { + delete message_.authorization_request_; + } + clear_has_message(); + } +} +inline ::appguard_commands::AuthorizationRequest* ClientMessage::release_authorization_request() { + // @@protoc_insertion_point(field_release:appguard_commands.ClientMessage.authorization_request) + if (_internal_has_authorization_request()) { + clear_has_message(); + ::appguard_commands::AuthorizationRequest* temp = message_.authorization_request_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.authorization_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::appguard_commands::AuthorizationRequest& ClientMessage::_internal_authorization_request() const { + return _internal_has_authorization_request() + ? *message_.authorization_request_ + : *reinterpret_cast< ::appguard_commands::AuthorizationRequest*>(&::appguard_commands::_AuthorizationRequest_default_instance_); +} +inline const ::appguard_commands::AuthorizationRequest& ClientMessage::authorization_request() const { + // @@protoc_insertion_point(field_get:appguard_commands.ClientMessage.authorization_request) + return _internal_authorization_request(); +} +inline ::appguard_commands::AuthorizationRequest* ClientMessage::unsafe_arena_release_authorization_request() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ClientMessage.authorization_request) + if (_internal_has_authorization_request()) { + clear_has_message(); + ::appguard_commands::AuthorizationRequest* temp = message_.authorization_request_; + message_.authorization_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ClientMessage::unsafe_arena_set_allocated_authorization_request(::appguard_commands::AuthorizationRequest* authorization_request) { + clear_message(); + if (authorization_request) { + set_has_authorization_request(); + message_.authorization_request_ = authorization_request; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ClientMessage.authorization_request) +} +inline ::appguard_commands::AuthorizationRequest* ClientMessage::_internal_mutable_authorization_request() { + if (!_internal_has_authorization_request()) { + clear_message(); + set_has_authorization_request(); + message_.authorization_request_ = CreateMaybeMessage< ::appguard_commands::AuthorizationRequest >(GetArena()); + } + return message_.authorization_request_; +} +inline ::appguard_commands::AuthorizationRequest* ClientMessage::mutable_authorization_request() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ClientMessage.authorization_request) + return _internal_mutable_authorization_request(); +} + +// .appguard_commands.Authentication authentication = 2; +inline bool ClientMessage::_internal_has_authentication() const { + return message_case() == kAuthentication; +} +inline bool ClientMessage::has_authentication() const { + return _internal_has_authentication(); +} +inline void ClientMessage::set_has_authentication() { + _oneof_case_[0] = kAuthentication; +} +inline void ClientMessage::clear_authentication() { + if (_internal_has_authentication()) { + if (GetArena() == nullptr) { + delete message_.authentication_; + } + clear_has_message(); + } +} +inline ::appguard_commands::Authentication* ClientMessage::release_authentication() { + // @@protoc_insertion_point(field_release:appguard_commands.ClientMessage.authentication) + if (_internal_has_authentication()) { + clear_has_message(); + ::appguard_commands::Authentication* temp = message_.authentication_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.authentication_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::appguard_commands::Authentication& ClientMessage::_internal_authentication() const { + return _internal_has_authentication() + ? *message_.authentication_ + : *reinterpret_cast< ::appguard_commands::Authentication*>(&::appguard_commands::_Authentication_default_instance_); +} +inline const ::appguard_commands::Authentication& ClientMessage::authentication() const { + // @@protoc_insertion_point(field_get:appguard_commands.ClientMessage.authentication) + return _internal_authentication(); +} +inline ::appguard_commands::Authentication* ClientMessage::unsafe_arena_release_authentication() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ClientMessage.authentication) + if (_internal_has_authentication()) { + clear_has_message(); + ::appguard_commands::Authentication* temp = message_.authentication_; + message_.authentication_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ClientMessage::unsafe_arena_set_allocated_authentication(::appguard_commands::Authentication* authentication) { + clear_message(); + if (authentication) { + set_has_authentication(); + message_.authentication_ = authentication; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ClientMessage.authentication) +} +inline ::appguard_commands::Authentication* ClientMessage::_internal_mutable_authentication() { + if (!_internal_has_authentication()) { + clear_message(); + set_has_authentication(); + message_.authentication_ = CreateMaybeMessage< ::appguard_commands::Authentication >(GetArena()); + } + return message_.authentication_; +} +inline ::appguard_commands::Authentication* ClientMessage::mutable_authentication() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ClientMessage.authentication) + return _internal_mutable_authentication(); +} + +inline bool ClientMessage::has_message() const { + return message_case() != MESSAGE_NOT_SET; +} +inline void ClientMessage::clear_has_message() { + _oneof_case_[0] = MESSAGE_NOT_SET; +} +inline ClientMessage::MessageCase ClientMessage::message_case() const { + return ClientMessage::MessageCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// AuthenticationData + +// string app_id = 1; +inline bool AuthenticationData::_internal_has_app_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AuthenticationData::has_app_id() const { + return _internal_has_app_id(); +} +inline void AuthenticationData::clear_app_id() { + app_id_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AuthenticationData::app_id() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthenticationData.app_id) + return _internal_app_id(); +} +inline void AuthenticationData::set_app_id(const std::string& value) { + _internal_set_app_id(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthenticationData.app_id) +} +inline std::string* AuthenticationData::mutable_app_id() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthenticationData.app_id) + return _internal_mutable_app_id(); +} +inline const std::string& AuthenticationData::_internal_app_id() const { + return app_id_.Get(); +} +inline void AuthenticationData::_internal_set_app_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthenticationData::set_app_id(std::string&& value) { + _has_bits_[0] |= 0x00000001u; + app_id_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthenticationData.app_id) +} +inline void AuthenticationData::set_app_id(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000001u; + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthenticationData.app_id) +} +inline void AuthenticationData::set_app_id(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000001u; + app_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthenticationData.app_id) +} +inline std::string* AuthenticationData::_internal_mutable_app_id() { + _has_bits_[0] |= 0x00000001u; + return app_id_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthenticationData::release_app_id() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthenticationData.app_id) + if (!_internal_has_app_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + return app_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthenticationData::set_allocated_app_id(std::string* app_id) { + if (app_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + app_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), app_id, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthenticationData.app_id) +} +inline std::string* AuthenticationData::unsafe_arena_release_app_id() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthenticationData.app_id) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return app_id_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthenticationData::unsafe_arena_set_allocated_app_id( + std::string* app_id) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (app_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + app_id_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + app_id, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthenticationData.app_id) +} + +// string app_secret = 2; +inline bool AuthenticationData::_internal_has_app_secret() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool AuthenticationData::has_app_secret() const { + return _internal_has_app_secret(); +} +inline void AuthenticationData::clear_app_secret() { + app_secret_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AuthenticationData::app_secret() const { + // @@protoc_insertion_point(field_get:appguard_commands.AuthenticationData.app_secret) + return _internal_app_secret(); +} +inline void AuthenticationData::set_app_secret(const std::string& value) { + _internal_set_app_secret(value); + // @@protoc_insertion_point(field_set:appguard_commands.AuthenticationData.app_secret) +} +inline std::string* AuthenticationData::mutable_app_secret() { + // @@protoc_insertion_point(field_mutable:appguard_commands.AuthenticationData.app_secret) + return _internal_mutable_app_secret(); +} +inline const std::string& AuthenticationData::_internal_app_secret() const { + return app_secret_.Get(); +} +inline void AuthenticationData::_internal_set_app_secret(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void AuthenticationData::set_app_secret(std::string&& value) { + _has_bits_[0] |= 0x00000002u; + app_secret_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.AuthenticationData.app_secret) +} +inline void AuthenticationData::set_app_secret(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _has_bits_[0] |= 0x00000002u; + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.AuthenticationData.app_secret) +} +inline void AuthenticationData::set_app_secret(const char* value, + size_t size) { + _has_bits_[0] |= 0x00000002u; + app_secret_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.AuthenticationData.app_secret) +} +inline std::string* AuthenticationData::_internal_mutable_app_secret() { + _has_bits_[0] |= 0x00000002u; + return app_secret_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* AuthenticationData::release_app_secret() { + // @@protoc_insertion_point(field_release:appguard_commands.AuthenticationData.app_secret) + if (!_internal_has_app_secret()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + return app_secret_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void AuthenticationData::set_allocated_app_secret(std::string* app_secret) { + if (app_secret != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + app_secret_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), app_secret, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:appguard_commands.AuthenticationData.app_secret) +} +inline std::string* AuthenticationData::unsafe_arena_release_app_secret() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.AuthenticationData.app_secret) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000002u; + return app_secret_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void AuthenticationData::unsafe_arena_set_allocated_app_secret( + std::string* app_secret) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (app_secret != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + app_secret_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + app_secret, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.AuthenticationData.app_secret) +} + +// ------------------------------------------------------------------- + +// ServerMessage + +// string update_token_command = 1; +inline bool ServerMessage::_internal_has_update_token_command() const { + return message_case() == kUpdateTokenCommand; +} +inline void ServerMessage::set_has_update_token_command() { + _oneof_case_[0] = kUpdateTokenCommand; +} +inline void ServerMessage::clear_update_token_command() { + if (_internal_has_update_token_command()) { + message_.update_token_command_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + clear_has_message(); + } +} +inline const std::string& ServerMessage::update_token_command() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.update_token_command) + return _internal_update_token_command(); +} +inline void ServerMessage::set_update_token_command(const std::string& value) { + _internal_set_update_token_command(value); + // @@protoc_insertion_point(field_set:appguard_commands.ServerMessage.update_token_command) +} +inline std::string* ServerMessage::mutable_update_token_command() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.update_token_command) + return _internal_mutable_update_token_command(); +} +inline const std::string& ServerMessage::_internal_update_token_command() const { + if (_internal_has_update_token_command()) { + return message_.update_token_command_.Get(); + } + return *&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void ServerMessage::_internal_set_update_token_command(const std::string& value) { + if (!_internal_has_update_token_command()) { + clear_message(); + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + message_.update_token_command_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void ServerMessage::set_update_token_command(std::string&& value) { + // @@protoc_insertion_point(field_set:appguard_commands.ServerMessage.update_token_command) + if (!_internal_has_update_token_command()) { + clear_message(); + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + message_.update_token_command_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:appguard_commands.ServerMessage.update_token_command) +} +inline void ServerMessage::set_update_token_command(const char* value) { + GOOGLE_DCHECK(value != nullptr); + if (!_internal_has_update_token_command()) { + clear_message(); + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + message_.update_token_command_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:appguard_commands.ServerMessage.update_token_command) +} +inline void ServerMessage::set_update_token_command(const char* value, + size_t size) { + if (!_internal_has_update_token_command()) { + clear_message(); + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + message_.update_token_command_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), + GetArena()); + // @@protoc_insertion_point(field_set_pointer:appguard_commands.ServerMessage.update_token_command) +} +inline std::string* ServerMessage::_internal_mutable_update_token_command() { + if (!_internal_has_update_token_command()) { + clear_message(); + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return message_.update_token_command_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* ServerMessage::release_update_token_command() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.update_token_command) + if (_internal_has_update_token_command()) { + clear_has_message(); + return message_.update_token_command_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void ServerMessage::set_allocated_update_token_command(std::string* update_token_command) { + if (has_message()) { + clear_message(); + } + if (update_token_command != nullptr) { + set_has_update_token_command(); + message_.update_token_command_.UnsafeSetDefault(update_token_command); + } + // @@protoc_insertion_point(field_set_allocated:appguard_commands.ServerMessage.update_token_command) +} +inline std::string* ServerMessage::unsafe_arena_release_update_token_command() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.update_token_command) + GOOGLE_DCHECK(GetArena() != nullptr); + if (_internal_has_update_token_command()) { + clear_has_message(); + return message_.update_token_command_.UnsafeArenaRelease( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_update_token_command(std::string* update_token_command) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (!_internal_has_update_token_command()) { + message_.update_token_command_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + clear_message(); + if (update_token_command) { + set_has_update_token_command(); + message_.update_token_command_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), update_token_command, GetArena()); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.update_token_command) +} + +// .appguard_commands.FirewallDefaults set_firewall_defaults = 2; +inline bool ServerMessage::_internal_has_set_firewall_defaults() const { + return message_case() == kSetFirewallDefaults; +} +inline bool ServerMessage::has_set_firewall_defaults() const { + return _internal_has_set_firewall_defaults(); +} +inline void ServerMessage::set_has_set_firewall_defaults() { + _oneof_case_[0] = kSetFirewallDefaults; +} +inline void ServerMessage::clear_set_firewall_defaults() { + if (_internal_has_set_firewall_defaults()) { + if (GetArena() == nullptr) { + delete message_.set_firewall_defaults_; + } + clear_has_message(); + } +} +inline ::appguard_commands::FirewallDefaults* ServerMessage::release_set_firewall_defaults() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.set_firewall_defaults) + if (_internal_has_set_firewall_defaults()) { + clear_has_message(); + ::appguard_commands::FirewallDefaults* temp = message_.set_firewall_defaults_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.set_firewall_defaults_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::appguard_commands::FirewallDefaults& ServerMessage::_internal_set_firewall_defaults() const { + return _internal_has_set_firewall_defaults() + ? *message_.set_firewall_defaults_ + : *reinterpret_cast< ::appguard_commands::FirewallDefaults*>(&::appguard_commands::_FirewallDefaults_default_instance_); +} +inline const ::appguard_commands::FirewallDefaults& ServerMessage::set_firewall_defaults() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.set_firewall_defaults) + return _internal_set_firewall_defaults(); +} +inline ::appguard_commands::FirewallDefaults* ServerMessage::unsafe_arena_release_set_firewall_defaults() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.set_firewall_defaults) + if (_internal_has_set_firewall_defaults()) { + clear_has_message(); + ::appguard_commands::FirewallDefaults* temp = message_.set_firewall_defaults_; + message_.set_firewall_defaults_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_set_firewall_defaults(::appguard_commands::FirewallDefaults* set_firewall_defaults) { + clear_message(); + if (set_firewall_defaults) { + set_has_set_firewall_defaults(); + message_.set_firewall_defaults_ = set_firewall_defaults; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.set_firewall_defaults) +} +inline ::appguard_commands::FirewallDefaults* ServerMessage::_internal_mutable_set_firewall_defaults() { + if (!_internal_has_set_firewall_defaults()) { + clear_message(); + set_has_set_firewall_defaults(); + message_.set_firewall_defaults_ = CreateMaybeMessage< ::appguard_commands::FirewallDefaults >(GetArena()); + } + return message_.set_firewall_defaults_; +} +inline ::appguard_commands::FirewallDefaults* ServerMessage::mutable_set_firewall_defaults() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.set_firewall_defaults) + return _internal_mutable_set_firewall_defaults(); +} + +// .google.protobuf.Empty heartbeat = 3; +inline bool ServerMessage::_internal_has_heartbeat() const { + return message_case() == kHeartbeat; +} +inline bool ServerMessage::has_heartbeat() const { + return _internal_has_heartbeat(); +} +inline void ServerMessage::set_has_heartbeat() { + _oneof_case_[0] = kHeartbeat; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::release_heartbeat() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.heartbeat) + if (_internal_has_heartbeat()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.heartbeat_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.heartbeat_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::_internal_heartbeat() const { + return _internal_has_heartbeat() + ? *message_.heartbeat_ + : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::heartbeat() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.heartbeat) + return _internal_heartbeat(); +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::unsafe_arena_release_heartbeat() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.heartbeat) + if (_internal_has_heartbeat()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.heartbeat_; + message_.heartbeat_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_heartbeat(PROTOBUF_NAMESPACE_ID::Empty* heartbeat) { + clear_message(); + if (heartbeat) { + set_has_heartbeat(); + message_.heartbeat_ = heartbeat; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.heartbeat) +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::_internal_mutable_heartbeat() { + if (!_internal_has_heartbeat()) { + clear_message(); + set_has_heartbeat(); + message_.heartbeat_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); + } + return message_.heartbeat_; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::mutable_heartbeat() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.heartbeat) + return _internal_mutable_heartbeat(); +} + +// .appguard_commands.AuthenticationData device_authorized = 4; +inline bool ServerMessage::_internal_has_device_authorized() const { + return message_case() == kDeviceAuthorized; +} +inline bool ServerMessage::has_device_authorized() const { + return _internal_has_device_authorized(); +} +inline void ServerMessage::set_has_device_authorized() { + _oneof_case_[0] = kDeviceAuthorized; +} +inline void ServerMessage::clear_device_authorized() { + if (_internal_has_device_authorized()) { + if (GetArena() == nullptr) { + delete message_.device_authorized_; + } + clear_has_message(); + } +} +inline ::appguard_commands::AuthenticationData* ServerMessage::release_device_authorized() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.device_authorized) + if (_internal_has_device_authorized()) { + clear_has_message(); + ::appguard_commands::AuthenticationData* temp = message_.device_authorized_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.device_authorized_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::appguard_commands::AuthenticationData& ServerMessage::_internal_device_authorized() const { + return _internal_has_device_authorized() + ? *message_.device_authorized_ + : *reinterpret_cast< ::appguard_commands::AuthenticationData*>(&::appguard_commands::_AuthenticationData_default_instance_); +} +inline const ::appguard_commands::AuthenticationData& ServerMessage::device_authorized() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.device_authorized) + return _internal_device_authorized(); +} +inline ::appguard_commands::AuthenticationData* ServerMessage::unsafe_arena_release_device_authorized() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.device_authorized) + if (_internal_has_device_authorized()) { + clear_has_message(); + ::appguard_commands::AuthenticationData* temp = message_.device_authorized_; + message_.device_authorized_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_device_authorized(::appguard_commands::AuthenticationData* device_authorized) { + clear_message(); + if (device_authorized) { + set_has_device_authorized(); + message_.device_authorized_ = device_authorized; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.device_authorized) +} +inline ::appguard_commands::AuthenticationData* ServerMessage::_internal_mutable_device_authorized() { + if (!_internal_has_device_authorized()) { + clear_message(); + set_has_device_authorized(); + message_.device_authorized_ = CreateMaybeMessage< ::appguard_commands::AuthenticationData >(GetArena()); + } + return message_.device_authorized_; +} +inline ::appguard_commands::AuthenticationData* ServerMessage::mutable_device_authorized() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.device_authorized) + return _internal_mutable_device_authorized(); +} + +// .google.protobuf.Empty device_deauthorized = 5; +inline bool ServerMessage::_internal_has_device_deauthorized() const { + return message_case() == kDeviceDeauthorized; +} +inline bool ServerMessage::has_device_deauthorized() const { + return _internal_has_device_deauthorized(); +} +inline void ServerMessage::set_has_device_deauthorized() { + _oneof_case_[0] = kDeviceDeauthorized; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::release_device_deauthorized() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.device_deauthorized) + if (_internal_has_device_deauthorized()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.device_deauthorized_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.device_deauthorized_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::_internal_device_deauthorized() const { + return _internal_has_device_deauthorized() + ? *message_.device_deauthorized_ + : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::device_deauthorized() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.device_deauthorized) + return _internal_device_deauthorized(); +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::unsafe_arena_release_device_deauthorized() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.device_deauthorized) + if (_internal_has_device_deauthorized()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.device_deauthorized_; + message_.device_deauthorized_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_device_deauthorized(PROTOBUF_NAMESPACE_ID::Empty* device_deauthorized) { + clear_message(); + if (device_deauthorized) { + set_has_device_deauthorized(); + message_.device_deauthorized_ = device_deauthorized; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.device_deauthorized) +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::_internal_mutable_device_deauthorized() { + if (!_internal_has_device_deauthorized()) { + clear_message(); + set_has_device_deauthorized(); + message_.device_deauthorized_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); + } + return message_.device_deauthorized_; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::mutable_device_deauthorized() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.device_deauthorized) + return _internal_mutable_device_deauthorized(); +} + +// .google.protobuf.Empty authorization_rejected = 6; +inline bool ServerMessage::_internal_has_authorization_rejected() const { + return message_case() == kAuthorizationRejected; +} +inline bool ServerMessage::has_authorization_rejected() const { + return _internal_has_authorization_rejected(); +} +inline void ServerMessage::set_has_authorization_rejected() { + _oneof_case_[0] = kAuthorizationRejected; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::release_authorization_rejected() { + // @@protoc_insertion_point(field_release:appguard_commands.ServerMessage.authorization_rejected) + if (_internal_has_authorization_rejected()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.authorization_rejected_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + message_.authorization_rejected_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::_internal_authorization_rejected() const { + return _internal_has_authorization_rejected() + ? *message_.authorization_rejected_ + : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty*>(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Empty& ServerMessage::authorization_rejected() const { + // @@protoc_insertion_point(field_get:appguard_commands.ServerMessage.authorization_rejected) + return _internal_authorization_rejected(); +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::unsafe_arena_release_authorization_rejected() { + // @@protoc_insertion_point(field_unsafe_arena_release:appguard_commands.ServerMessage.authorization_rejected) + if (_internal_has_authorization_rejected()) { + clear_has_message(); + PROTOBUF_NAMESPACE_ID::Empty* temp = message_.authorization_rejected_; + message_.authorization_rejected_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ServerMessage::unsafe_arena_set_allocated_authorization_rejected(PROTOBUF_NAMESPACE_ID::Empty* authorization_rejected) { + clear_message(); + if (authorization_rejected) { + set_has_authorization_rejected(); + message_.authorization_rejected_ = authorization_rejected; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:appguard_commands.ServerMessage.authorization_rejected) +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::_internal_mutable_authorization_rejected() { + if (!_internal_has_authorization_rejected()) { + clear_message(); + set_has_authorization_rejected(); + message_.authorization_rejected_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); + } + return message_.authorization_rejected_; +} +inline PROTOBUF_NAMESPACE_ID::Empty* ServerMessage::mutable_authorization_rejected() { + // @@protoc_insertion_point(field_mutable:appguard_commands.ServerMessage.authorization_rejected) + return _internal_mutable_authorization_rejected(); +} + +inline bool ServerMessage::has_message() const { + return message_case() != MESSAGE_NOT_SET; +} +inline void ServerMessage::clear_has_message() { + _oneof_case_[0] = MESSAGE_NOT_SET; +} +inline ServerMessage::MessageCase ServerMessage::message_case() const { + return ServerMessage::MessageCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// FirewallDefaults + +// uint32 timeout = 1; +inline void FirewallDefaults::clear_timeout() { + timeout_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 FirewallDefaults::_internal_timeout() const { + return timeout_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 FirewallDefaults::timeout() const { + // @@protoc_insertion_point(field_get:appguard_commands.FirewallDefaults.timeout) + return _internal_timeout(); +} +inline void FirewallDefaults::_internal_set_timeout(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + timeout_ = value; +} +inline void FirewallDefaults::set_timeout(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_timeout(value); + // @@protoc_insertion_point(field_set:appguard_commands.FirewallDefaults.timeout) +} + +// .appguard_commands.FirewallPolicy policy = 2; +inline void FirewallDefaults::clear_policy() { + policy_ = 0; +} +inline ::appguard_commands::FirewallPolicy FirewallDefaults::_internal_policy() const { + return static_cast< ::appguard_commands::FirewallPolicy >(policy_); +} +inline ::appguard_commands::FirewallPolicy FirewallDefaults::policy() const { + // @@protoc_insertion_point(field_get:appguard_commands.FirewallDefaults.policy) + return _internal_policy(); +} +inline void FirewallDefaults::_internal_set_policy(::appguard_commands::FirewallPolicy value) { + + policy_ = value; +} +inline void FirewallDefaults::set_policy(::appguard_commands::FirewallPolicy value) { + _internal_set_policy(value); + // @@protoc_insertion_point(field_set:appguard_commands.FirewallDefaults.policy) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace appguard_commands + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::appguard_commands::FirewallPolicy> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::appguard_commands::FirewallPolicy>() { + return ::appguard_commands::FirewallPolicy_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_commands_2eproto