From 6113b030d988cbebcdc5eb4c8ba49c2ce0c42ea9 Mon Sep 17 00:00:00 2001 From: Denys Datsko <35429810+ddatsko@users.noreply.github.com> Date: Sun, 7 Apr 2024 00:22:33 +0200 Subject: [PATCH] Arm authorization (#2267) * Added arm authorization server functionality --- examples/CMakeLists.txt | 1 + examples/arm_authorizer_server/CMakeLists.txt | 22 + .../arm_authorizer_server.cpp | 66 + proto | 2 +- .../arm_authorizer_server/CMakeLists.txt | 15 + .../arm_authorizer_server.cpp | 78 + .../arm_authorizer_server_impl.cpp | 118 + .../arm_authorizer_server_impl.h | 36 + .../arm_authorizer_server.h | 146 ++ .../arm_authorizer/arm_authorizer.grpc.pb.cc | 125 ++ .../arm_authorizer/arm_authorizer.grpc.pb.h | 406 ++++ .../arm_authorizer/arm_authorizer.pb.cc | 797 +++++++ .../arm_authorizer/arm_authorizer.pb.h | 951 +++++++++ .../arm_authorizer_server.grpc.pb.cc | 167 ++ .../arm_authorizer_server.grpc.pb.h | 566 +++++ .../arm_authorizer_server.pb.cc | 1612 ++++++++++++++ .../arm_authorizer_server.pb.h | 1890 +++++++++++++++++ src/mavsdk_server/src/grpc_server.cpp | 8 + src/mavsdk_server/src/grpc_server.h | 17 + .../arm_authorizer_service_impl.h | 202 ++ .../arm_authorizer_server_service_impl.h | 275 +++ src/plugins.txt | 1 + 22 files changed, 7500 insertions(+), 1 deletion(-) create mode 100644 examples/arm_authorizer_server/CMakeLists.txt create mode 100644 examples/arm_authorizer_server/arm_authorizer_server.cpp create mode 100644 src/mavsdk/plugins/arm_authorizer_server/CMakeLists.txt create mode 100644 src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server.cpp create mode 100644 src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.cpp create mode 100644 src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.h create mode 100644 src/mavsdk/plugins/arm_authorizer_server/include/plugins/arm_authorizer_server/arm_authorizer_server.h create mode 100644 src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.cc create mode 100644 src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.h create mode 100644 src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.cc create mode 100644 src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.h create mode 100644 src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.cc create mode 100644 src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.h create mode 100644 src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.cc create mode 100644 src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.h create mode 100644 src/mavsdk_server/src/plugins/arm_authorizer/arm_authorizer_service_impl.h create mode 100644 src/mavsdk_server/src/plugins/arm_authorizer_server/arm_authorizer_server_service_impl.h diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 18245de215..ab19376cd4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -7,6 +7,7 @@ if (WERROR) add_compile_options(-Werror) endif() +add_subdirectory(arm_authorizer_server) add_subdirectory(autopilot_server) add_subdirectory(battery) add_subdirectory(calibrate) diff --git a/examples/arm_authorizer_server/CMakeLists.txt b/examples/arm_authorizer_server/CMakeLists.txt new file mode 100644 index 0000000000..9af31f7d6e --- /dev/null +++ b/examples/arm_authorizer_server/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.10.2) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project(arm_authorizer_server) + +add_executable(arm_authorizer_server + arm_authorizer_server.cpp +) + +find_package(MAVSDK REQUIRED) + +target_link_libraries(arm_authorizer_server + MAVSDK::mavsdk +) + +if (NOT MSVC) + add_compile_options(arm_authorizer_server PRIVATE -Wall -Wextra) +else () + add_compile_options(arm_authorizer_server PRIVATE -WX -W2) +endif () diff --git a/examples/arm_authorizer_server/arm_authorizer_server.cpp b/examples/arm_authorizer_server/arm_authorizer_server.cpp new file mode 100644 index 0000000000..410fcbd6ae --- /dev/null +++ b/examples/arm_authorizer_server/arm_authorizer_server.cpp @@ -0,0 +1,66 @@ +#include +#include +#include +#include +#include +#include + +constexpr uint32_t ARM_AUTHORIZATION_DELAY_S = 5; + +using mavsdk::ArmAuthorizerServer; + +int main(int argc, char** argv) +{ + if (argc < 2) { + std::cerr << "Too few input arguments. usage: $ arm_authorizer_server " + << std::endl; + return 1; + } + + // Create mavlink component with CompanionComputer id + mavsdk::Mavsdk mavsdk{ + mavsdk::Mavsdk::Configuration{mavsdk::Mavsdk::ComponentType::GroundStation}}; + + auto result = mavsdk.add_any_connection(argv[1]); + + if (result != mavsdk::ConnectionResult::Success) { + std::cerr << "Could not establish connection: " << result << std::endl; + return 2; + } + std::cout << "Created arm authorizer server connection" << std::endl; + + auto arm_authorizer = ArmAuthorizerServer{mavsdk.server_component()}; + + // Rememember the time when execution started. Arming will be authorized after specific time + // interval elapsed + auto start_time = std::chrono::system_clock::now(); + + arm_authorizer.subscribe_arm_authorization([&](uint32_t system_id) { + std::cout << "Arm authorization request received. Request for system ID: " << system_id + << std::endl; + auto elapsed_s = std::chrono::duration_cast( + std::chrono::system_clock::now() - start_time) + .count(); + + ArmAuthorizerServer::Result result; + // Allow arm if sufficient time has passed + if (elapsed_s > ARM_AUTHORIZATION_DELAY_S) { + result = arm_authorizer.accept_arm_authorization(5); + } else { + result = arm_authorizer.reject_arm_authorization( + true, ArmAuthorizerServer::RejectionReason::Generic, 10); + } + if (result == ArmAuthorizerServer::Result::Success) { + std::cout << "Successfully sent the response" << std::endl; + } else { + std::cout << "Failed to send the response" << std::endl; + } + }); + + // works as a server and never quit + while (true) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + } + + return 0; +} diff --git a/proto b/proto index c61e60d48c..1acb789720 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit c61e60d48c1148cdb09b2256e1943d5d10640606 +Subproject commit 1acb7897208423c311c574448b43635f26965c05 diff --git a/src/mavsdk/plugins/arm_authorizer_server/CMakeLists.txt b/src/mavsdk/plugins/arm_authorizer_server/CMakeLists.txt new file mode 100644 index 0000000000..8b16c80088 --- /dev/null +++ b/src/mavsdk/plugins/arm_authorizer_server/CMakeLists.txt @@ -0,0 +1,15 @@ +target_sources(mavsdk + PRIVATE + arm_authorizer_server.cpp + arm_authorizer_server_impl.cpp +) + +target_include_directories(mavsdk PUBLIC + $ + $ + ) + +install(FILES + include/plugins/arm_authorizer_server/arm_authorizer_server.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mavsdk/plugins/arm_authorizer_server +) \ No newline at end of file diff --git a/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server.cpp b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server.cpp new file mode 100644 index 0000000000..122d1b2c27 --- /dev/null +++ b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server.cpp @@ -0,0 +1,78 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see +// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/arm_authorizer_server/arm_authorizer_server.proto) + +#include + +#include "arm_authorizer_server_impl.h" +#include "plugins/arm_authorizer_server/arm_authorizer_server.h" + +namespace mavsdk { + +ArmAuthorizerServer::ArmAuthorizerServer(std::shared_ptr server_component) : + ServerPluginBase(), + _impl{std::make_unique(server_component)} +{} + +ArmAuthorizerServer::~ArmAuthorizerServer() {} + +ArmAuthorizerServer::ArmAuthorizationHandle +ArmAuthorizerServer::subscribe_arm_authorization(const ArmAuthorizationCallback& callback) +{ + return _impl->subscribe_arm_authorization(callback); +} + +void ArmAuthorizerServer::unsubscribe_arm_authorization(ArmAuthorizationHandle handle) +{ + _impl->unsubscribe_arm_authorization(handle); +} + +ArmAuthorizerServer::Result +ArmAuthorizerServer::accept_arm_authorization(int32_t valid_time_s) const +{ + return _impl->accept_arm_authorization(valid_time_s); +} + +ArmAuthorizerServer::Result ArmAuthorizerServer::reject_arm_authorization( + bool temporarily, RejectionReason reason, int32_t extra_info) const +{ + return _impl->reject_arm_authorization(temporarily, reason, extra_info); +} + +std::ostream& operator<<(std::ostream& str, ArmAuthorizerServer::Result const& result) +{ + switch (result) { + case ArmAuthorizerServer::Result::Unknown: + return str << "Unknown"; + case ArmAuthorizerServer::Result::Success: + return str << "Success"; + case ArmAuthorizerServer::Result::Failed: + return str << "Failed"; + default: + return str << "Unknown"; + } +} + +std::ostream& +operator<<(std::ostream& str, ArmAuthorizerServer::RejectionReason const& rejection_reason) +{ + switch (rejection_reason) { + case ArmAuthorizerServer::RejectionReason::Generic: + return str << "Generic"; + case ArmAuthorizerServer::RejectionReason::None: + return str << "None"; + case ArmAuthorizerServer::RejectionReason::InvalidWaypoint: + return str << "Invalid Waypoint"; + case ArmAuthorizerServer::RejectionReason::Timeout: + return str << "Timeout"; + case ArmAuthorizerServer::RejectionReason::AirspaceInUse: + return str << "Airspace In Use"; + case ArmAuthorizerServer::RejectionReason::BadWeather: + return str << "Bad Weather"; + default: + return str << "Unknown"; + } +} + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.cpp b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.cpp new file mode 100644 index 0000000000..3e243d48b4 --- /dev/null +++ b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.cpp @@ -0,0 +1,118 @@ +#include "arm_authorizer_server_impl.h" + +#include +#include "log.h" + +namespace mavsdk { + +ArmAuthorizerServerImpl::ArmAuthorizerServerImpl( + std::shared_ptr server_component) : + ServerPluginImplBase(std::move(server_component)) +{ + _server_component_impl->register_plugin(this); +} + +ArmAuthorizerServerImpl::~ArmAuthorizerServerImpl() +{ + _server_component_impl->unregister_plugin(this); +} + +void ArmAuthorizerServerImpl::init() +{ + _server_component_impl->register_mavlink_command_handler( + MAV_CMD_ARM_AUTHORIZATION_REQUEST, + [this](const MavlinkCommandReceiver::CommandLong& command) { + return process_arm_authorization_request(command); + }, + this); +} + +void ArmAuthorizerServerImpl::deinit() {} + +ArmAuthorizerServer::ArmAuthorizationHandle ArmAuthorizerServerImpl::subscribe_arm_authorization( + const ArmAuthorizerServer::ArmAuthorizationCallback& callback) +{ + return _arm_authorization_callbacks.subscribe(callback); +} + +void ArmAuthorizerServerImpl::unsubscribe_arm_authorization( + ArmAuthorizerServer::ArmAuthorizationHandle handle) +{ + _arm_authorization_callbacks.unsubscribe(handle); +} + +std::optional ArmAuthorizerServerImpl::process_arm_authorization_request( + const MavlinkCommandReceiver::CommandLong& command) +{ + if (_arm_authorization_callbacks.empty()) { + LogDebug() << "Set mode requested with no user callback"; + return _server_component_impl->make_command_ack_message( + command, MAV_RESULT::MAV_RESULT_UNSUPPORTED); + } + auto const system_id = static_cast(command.params.param1); + + _last_arm_authorization_request_command = command; + _arm_authorization_callbacks(system_id); + + return std::nullopt; +} + +ArmAuthorizerServer::Result +ArmAuthorizerServerImpl::accept_arm_authorization(int32_t valid_time_s) const +{ + auto command_ack = _server_component_impl->make_command_ack_message( + _last_arm_authorization_request_command, MAV_RESULT_ACCEPTED); + + // If the arm is authorized, param2 is set to the time in seconds through which the + // authorization is valid + command_ack.result_param2 = valid_time_s; + + if (!_server_component_impl->send_command_ack(command_ack)) { + return ArmAuthorizerServer::Result::Failed; + } + return ArmAuthorizerServer::Result::Success; +} + +ArmAuthorizerServer::Result ArmAuthorizerServerImpl::reject_arm_authorization( + bool temporarily, ArmAuthorizerServer::RejectionReason reason, int32_t extra_info) const +{ + MAV_RESULT result = temporarily ? MAV_RESULT_TEMPORARILY_REJECTED : MAV_RESULT_DENIED; + auto command_ack = _server_component_impl->make_command_ack_message( + _last_arm_authorization_request_command, result); + + // Fill in progress, which is the reason for arm rejected or 0 if arm was allowed + switch (reason) { + case ArmAuthorizerServer::RejectionReason::Generic: + command_ack.progress = static_cast(MAV_ARM_AUTH_DENIED_REASON_GENERIC); + break; + case ArmAuthorizerServer::RejectionReason::Timeout: + command_ack.progress = static_cast(MAV_ARM_AUTH_DENIED_REASON_TIMEOUT); + break; + case ArmAuthorizerServer::RejectionReason::BadWeather: + command_ack.progress = static_cast(MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER); + break; + case ArmAuthorizerServer::RejectionReason::InvalidWaypoint: + command_ack.progress = + static_cast(MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT); + break; + case ArmAuthorizerServer::RejectionReason::AirspaceInUse: + command_ack.progress = static_cast(MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE); + break; + case ArmAuthorizerServer::RejectionReason::None: + [[fallthrough]]; + default: + command_ack.progress = static_cast(MAV_ARM_AUTH_DENIED_REASON_NONE); + break; + } + + // Fill in the extra information. It is dependent on the decision, and and reason + command_ack.result_param2 = extra_info; + + if (!_server_component_impl->send_command_ack(command_ack)) { + return ArmAuthorizerServer::Result::Failed; + } + + return ArmAuthorizerServer::Result::Success; +} + +} // namespace mavsdk diff --git a/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.h b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.h new file mode 100644 index 0000000000..02891d7179 --- /dev/null +++ b/src/mavsdk/plugins/arm_authorizer_server/arm_authorizer_server_impl.h @@ -0,0 +1,36 @@ +#pragma once + +#include "plugins/arm_authorizer_server/arm_authorizer_server.h" +#include "server_plugin_impl_base.h" +#include "callback_list.h" + +namespace mavsdk { + +class ArmAuthorizerServerImpl : public ServerPluginImplBase { +public: + explicit ArmAuthorizerServerImpl(std::shared_ptr server_component); + + ~ArmAuthorizerServerImpl() override; + + void init() override; + void deinit() override; + + ArmAuthorizerServer::ArmAuthorizationHandle + subscribe_arm_authorization(const ArmAuthorizerServer::ArmAuthorizationCallback& callback); + + void unsubscribe_arm_authorization(ArmAuthorizerServer::ArmAuthorizationHandle handle); + + ArmAuthorizerServer::Result accept_arm_authorization(int32_t valid_time_s) const; + ArmAuthorizerServer::Result reject_arm_authorization( + bool temporarily, ArmAuthorizerServer::RejectionReason reason, int32_t extra_info) const; + +private: + CallbackList _arm_authorization_callbacks{}; + + MavlinkCommandReceiver::CommandLong _last_arm_authorization_request_command; + + std::optional + process_arm_authorization_request(const MavlinkCommandReceiver::CommandLong& command); +}; + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/arm_authorizer_server/include/plugins/arm_authorizer_server/arm_authorizer_server.h b/src/mavsdk/plugins/arm_authorizer_server/include/plugins/arm_authorizer_server/arm_authorizer_server.h new file mode 100644 index 0000000000..6b58d5c2a8 --- /dev/null +++ b/src/mavsdk/plugins/arm_authorizer_server/include/plugins/arm_authorizer_server/arm_authorizer_server.h @@ -0,0 +1,146 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see +// https://github.com/mavlink/MAVSDK-Proto/blob/main/protos/arm_authorizer_server/arm_authorizer_server.proto) + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "server_plugin_base.h" + +#include "handle.h" + +namespace mavsdk { + +class ServerComponent; +class ArmAuthorizerServerImpl; + +/** + * @brief + */ +class ArmAuthorizerServer : public ServerPluginBase { +public: + /** + * @brief Constructor. Creates the plugin for a ServerComponent instance. + * + * The plugin is typically created as shown below: + * + * ```cpp + * auto arm_authorizer_server = ArmAuthorizerServer(server_component); + * ``` + * + * @param server_component The ServerComponent instance associated with this server plugin. + */ + explicit ArmAuthorizerServer(std::shared_ptr server_component); + + /** + * @brief Destructor (internal use only). + */ + ~ArmAuthorizerServer() override; + + /** + * @brief + */ + enum class RejectionReason { + Generic, /**< @brief Not a specific reason. */ + None, /**< @brief Authorizer will send the error as string to GCS. */ + InvalidWaypoint, /**< @brief At least one waypoint have a invalid value. */ + Timeout, /**< @brief Timeout in the authorizer process(in case it depends on network). */ + AirspaceInUse, /**< @brief Airspace of the mission in use by another vehicle, second result + parameter can have the waypoint id that caused it to be denied.. */ + BadWeather, /**< @brief Weather is not good to fly. */ + }; + + /** + * @brief Stream operator to print information about a `ArmAuthorizerServer::RejectionReason`. + * + * @return A reference to the stream. + */ + friend std::ostream& + operator<<(std::ostream& str, ArmAuthorizerServer::RejectionReason const& rejection_reason); + + /** + * @brief + */ + enum class Result { + Unknown, /**< @brief Unknown result. */ + Success, /**< @brief Command accepted. */ + Failed, /**< @brief Command failed. */ + }; + + /** + * @brief Stream operator to print information about a `ArmAuthorizerServer::Result`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, ArmAuthorizerServer::Result const& result); + + /** + * @brief Callback type for asynchronous ArmAuthorizerServer calls. + */ + using ResultCallback = std::function; + + /** + * @brief Callback type for subscribe_arm_authorization. + */ + using ArmAuthorizationCallback = std::function; + + /** + * @brief Handle type for subscribe_arm_authorization. + */ + using ArmAuthorizationHandle = Handle; + + /** + * @brief Subscribe to arm authorization request messages. Each request received should respond + * to using RespondArmAuthorization + */ + ArmAuthorizationHandle subscribe_arm_authorization(const ArmAuthorizationCallback& callback); + + /** + * @brief Unsubscribe from subscribe_arm_authorization + */ + void unsubscribe_arm_authorization(ArmAuthorizationHandle handle); + + /** + * @brief Authorize arm for the specific time + * + * This function is blocking. + * + * @return Result of request. + */ + Result accept_arm_authorization(int32_t valid_time_s) const; + + /** + * @brief Reject arm authorization request + * + * This function is blocking. + * + * @return Result of request. + */ + Result + reject_arm_authorization(bool temporarily, RejectionReason reason, int32_t extra_info) const; + + /** + * @brief Copy constructor. + */ + ArmAuthorizerServer(const ArmAuthorizerServer& other); + + /** + * @brief Equality operator (object is not copyable). + */ + const ArmAuthorizerServer& operator=(const ArmAuthorizerServer&) = delete; + +private: + /** @private Underlying implementation, set at instantiation */ + std::unique_ptr _impl; +}; + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.cc b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.cc new file mode 100644 index 0000000000..9fc1c15fd1 --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.cc @@ -0,0 +1,125 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: arm_authorizer/arm_authorizer.proto + +#include "arm_authorizer/arm_authorizer.pb.h" +#include "arm_authorizer/arm_authorizer.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { + +static const char* ArmAuthorizerService_method_names[] = { + "/mavsdk.rpc.arm_authorizer.ArmAuthorizerService/SubscribeArmAuthorization", + "/mavsdk.rpc.arm_authorizer.ArmAuthorizerService/RespondArmAuthorization", +}; + +std::unique_ptr< ArmAuthorizerService::Stub> ArmAuthorizerService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< ArmAuthorizerService::Stub> stub(new ArmAuthorizerService::Stub(channel, options)); + return stub; +} + +ArmAuthorizerService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_SubscribeArmAuthorization_(ArmAuthorizerService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_RespondArmAuthorization_(ArmAuthorizerService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::ClientReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* ArmAuthorizerService::Stub::SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request) { + return ::grpc::internal::ClientReaderFactory< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>::Create(channel_.get(), rpcmethod_SubscribeArmAuthorization_, context, request); +} + +void ArmAuthorizerService::Stub::async::SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_SubscribeArmAuthorization_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* ArmAuthorizerService::Stub::AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeArmAuthorization_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* ArmAuthorizerService::Stub::PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeArmAuthorization_, context, request, false, nullptr); +} + +::grpc::Status ArmAuthorizerService::Stub::RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RespondArmAuthorization_, context, request, response); +} + +void ArmAuthorizerService::Stub::async::RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RespondArmAuthorization_, context, request, response, std::move(f)); +} + +void ArmAuthorizerService::Stub::async::RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RespondArmAuthorization_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* ArmAuthorizerService::Stub::PrepareAsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RespondArmAuthorization_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* ArmAuthorizerService::Stub::AsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRespondArmAuthorizationRaw(context, request, cq); + result->StartCall(); + return result; +} + +ArmAuthorizerService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + ArmAuthorizerService_method_names[0], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< ArmAuthorizerService::Service, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>( + [](ArmAuthorizerService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* req, + ::grpc::ServerWriter<::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* writer) { + return service->SubscribeArmAuthorization(ctx, req, writer); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ArmAuthorizerService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ArmAuthorizerService::Service, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ArmAuthorizerService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* req, + ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* resp) { + return service->RespondArmAuthorization(ctx, req, resp); + }, this))); +} + +ArmAuthorizerService::Service::~Service() { +} + +::grpc::Status ArmAuthorizerService::Service::SubscribeArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ArmAuthorizerService::Service::RespondArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace mavsdk +} // namespace rpc +} // namespace arm_authorizer + diff --git a/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.h b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.h new file mode 100644 index 0000000000..056d4c636a --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.grpc.pb.h @@ -0,0 +1,406 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: arm_authorizer/arm_authorizer.proto +#ifndef GRPC_arm_5fauthorizer_2farm_5fauthorizer_2eproto__INCLUDED +#define GRPC_arm_5fauthorizer_2farm_5fauthorizer_2eproto__INCLUDED + +#include "arm_authorizer/arm_authorizer.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { + +class ArmAuthorizerService final { + public: + static constexpr char const* service_full_name() { + return "mavsdk.rpc.arm_authorizer.ArmAuthorizerService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(SubscribeArmAuthorizationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> AsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(AsyncSubscribeArmAuthorizationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> PrepareAsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(PrepareAsyncSubscribeArmAuthorizationRaw(context, request, cq)); + } + // Respond to an arm authorization request from SubscribeArmAuthorization + virtual ::grpc::Status RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>> AsyncRespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>>(AsyncRespondArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>> PrepareAsyncRespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>>(PrepareAsyncRespondArmAuthorizationRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + virtual void SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* reactor) = 0; + // Respond to an arm authorization request from SubscribeArmAuthorization + virtual void RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response, std::function) = 0; + virtual void RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* 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< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* AsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* PrepareAsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& 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< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request) { + return std::unique_ptr< ::grpc::ClientReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(SubscribeArmAuthorizationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> AsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(AsyncSubscribeArmAuthorizationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>> PrepareAsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>>(PrepareAsyncSubscribeArmAuthorizationRaw(context, request, cq)); + } + ::grpc::Status RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>> AsyncRespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>>(AsyncRespondArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>> PrepareAsyncRespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>>(PrepareAsyncRespondArmAuthorizationRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* reactor) override; + void RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response, std::function) override; + void RespondArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* 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< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* AsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* PrepareAsyncRespondArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_SubscribeArmAuthorization_; + const ::grpc::internal::RpcMethod rpcmethod_RespondArmAuthorization_; + }; + 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(); + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + virtual ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* writer); + // Respond to an arm authorization request from SubscribeArmAuthorization + virtual ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response); + }; + template + class WithAsyncMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeArmAuthorization(::grpc::ServerContext* context, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request, ::grpc::ServerAsyncWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* 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_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RespondArmAuthorization() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRespondArmAuthorization(::grpc::ServerContext* context, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* 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); + } + }; + typedef WithAsyncMethod_SubscribeArmAuthorization > AsyncService; + template + class WithCallbackMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* request) { return this->SubscribeArmAuthorization(context, request); })); + } + ~WithCallbackMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* SubscribeArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/) { return nullptr; } + }; + template + class WithCallbackMethod_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RespondArmAuthorization() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* response) { return this->RespondArmAuthorization(context, request, response); }));} + void SetMessageAllocatorFor_RespondArmAuthorization( + ::grpc::MessageAllocator< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RespondArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_SubscribeArmAuthorization > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RespondArmAuthorization() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeArmAuthorization(::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_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RespondArmAuthorization() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRespondArmAuthorization(::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 WithRawCallbackMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->SubscribeArmAuthorization(context, request); })); + } + ~WithRawCallbackMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* SubscribeArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RespondArmAuthorization() { + ::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->RespondArmAuthorization(context, request, response); })); + } + ~WithRawCallbackMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RespondArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_RespondArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RespondArmAuthorization() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* streamer) { + return this->StreamedRespondArmAuthorization(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RespondArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RespondArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRespondArmAuthorization(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest,::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_RespondArmAuthorization StreamedUnaryService; + template + class WithSplitStreamingMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::SplitServerStreamingHandler< + ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerSplitStreamer< + ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* streamer) { + return this->StreamedSubscribeArmAuthorization(context, + streamer); + })); + } + ~WithSplitStreamingMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSubscribeArmAuthorization(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest,::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_SubscribeArmAuthorization SplitStreamedService; + typedef WithSplitStreamingMethod_SubscribeArmAuthorization > StreamedService; +}; + +} // namespace arm_authorizer +} // namespace rpc +} // namespace mavsdk + + +#endif // GRPC_arm_5fauthorizer_2farm_5fauthorizer_2eproto__INCLUDED diff --git a/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.cc b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.cc new file mode 100644 index 0000000000..167b83364e --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.cc @@ -0,0 +1,797 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: arm_authorizer/arm_authorizer.proto + +#include "arm_authorizer/arm_authorizer.pb.h" + +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { + +inline constexpr SubscribeArmAuthorizationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : system_id_{0u}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR SubscribeArmAuthorizationResponse::SubscribeArmAuthorizationResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct SubscribeArmAuthorizationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR SubscribeArmAuthorizationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SubscribeArmAuthorizationResponseDefaultTypeInternal() {} + union { + SubscribeArmAuthorizationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SubscribeArmAuthorizationResponseDefaultTypeInternal _SubscribeArmAuthorizationResponse_default_instance_; + template +PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest(::_pbi::ConstantInitialized) {} +struct SubscribeArmAuthorizationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SubscribeArmAuthorizationRequestDefaultTypeInternal() {} + union { + SubscribeArmAuthorizationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SubscribeArmAuthorizationRequestDefaultTypeInternal _SubscribeArmAuthorizationRequest_default_instance_; + +inline constexpr RespondArmAuthorizationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : command_answer_{static_cast< ::mavsdk::rpc::arm_authorizer::CommandAnswer >(0)}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RespondArmAuthorizationResponse::RespondArmAuthorizationResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RespondArmAuthorizationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RespondArmAuthorizationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RespondArmAuthorizationResponseDefaultTypeInternal() {} + union { + RespondArmAuthorizationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RespondArmAuthorizationResponseDefaultTypeInternal _RespondArmAuthorizationResponse_default_instance_; + +inline constexpr RespondArmAuthorizationRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : arm_authorizer_decision_{static_cast< ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision >(0)}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RespondArmAuthorizationRequest::RespondArmAuthorizationRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RespondArmAuthorizationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RespondArmAuthorizationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RespondArmAuthorizationRequestDefaultTypeInternal() {} + union { + RespondArmAuthorizationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RespondArmAuthorizationRequestDefaultTypeInternal _RespondArmAuthorizationRequest_default_instance_; +} // namespace arm_authorizer +} // namespace rpc +} // namespace mavsdk +static ::_pb::Metadata file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto[4]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto[2]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto = nullptr; +const ::uint32_t TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse, _impl_.system_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest, _impl_.arm_authorizer_decision_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse, _impl_.command_answer_), +}; + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest)}, + {8, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationResponse)}, + {17, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationRequest)}, + {26, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer::RespondArmAuthorizationResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::mavsdk::rpc::arm_authorizer::_SubscribeArmAuthorizationRequest_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer::_SubscribeArmAuthorizationResponse_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer::_RespondArmAuthorizationRequest_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer::_RespondArmAuthorizationResponse_default_instance_._instance, +}; +const char descriptor_table_protodef_arm_5fauthorizer_2farm_5fauthorizer_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n#arm_authorizer/arm_authorizer.proto\022\031m" + "avsdk.rpc.arm_authorizer\032\024mavsdk_options" + ".proto\"\"\n SubscribeArmAuthorizationReque" + "st\"6\n!SubscribeArmAuthorizationResponse\022" + "\021\n\tsystem_id\030\001 \001(\r\"s\n\036RespondArmAuthoriz" + "ationRequest\022Q\n\027arm_authorizer_decision\030" + "\001 \001(\01620.mavsdk.rpc.arm_authorizer.ArmAut" + "horizerDecision\"c\n\037RespondArmAuthorizati" + "onResponse\022@\n\016command_answer\030\001 \001(\0162(.mav" + "sdk.rpc.arm_authorizer.CommandAnswer*f\n\025" + "ArmAuthorizerDecision\022\025\n\021DECISION_ACCEPT" + "ED\020\000\022!\n\035DECISION_TEMPORARILY_REJECTED\020\001\022" + "\023\n\017DECISION_DENIED\020\002*G\n\rCommandAnswer\022\033\n" + "\027COMMAND_ANSWER_ACCEPTED\020\000\022\031\n\025COMMAND_AN" + "SWER_FAILED\020\0012\320\002\n\024ArmAuthorizerService\022\236" + "\001\n\031SubscribeArmAuthorization\022;.mavsdk.rp" + "c.arm_authorizer.SubscribeArmAuthorizati" + "onRequest\032<.mavsdk.rpc.arm_authorizer.Su" + "bscribeArmAuthorizationResponse\"\004\200\265\030\0000\001\022" + "\226\001\n\027RespondArmAuthorization\0229.mavsdk.rpc" + ".arm_authorizer.RespondArmAuthorizationR" + "equest\032:.mavsdk.rpc.arm_authorizer.Respo" + "ndArmAuthorizationResponse\"\004\200\265\030\001B.\n\030io.m" + "avsdk.arm_authorizerB\022ArmAuthorizerProto" + "b\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_deps[1] = + { + &::descriptor_table_mavsdk_5foptions_2eproto, +}; +static ::absl::once_flag descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto = { + false, + false, + 968, + descriptor_table_protodef_arm_5fauthorizer_2farm_5fauthorizer_2eproto, + "arm_authorizer/arm_authorizer.proto", + &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once, + descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_deps, + 1, + 4, + schemas, + file_default_instances, + TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto::offsets, + file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto, + file_level_enum_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto, + file_level_service_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto, +}; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_getter() { + return &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +} +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_arm_5fauthorizer_2farm_5fauthorizer_2eproto(&descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto); +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { +const ::google::protobuf::EnumDescriptor* ArmAuthorizerDecision_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto); + return file_level_enum_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t ArmAuthorizerDecision_internal_data_[] = { + 196608u, 0u, }; +bool ArmAuthorizerDecision_IsValid(int value) { + return 0 <= value && value <= 2; +} +const ::google::protobuf::EnumDescriptor* CommandAnswer_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto); + return file_level_enum_descriptors_arm_5fauthorizer_2farm_5fauthorizer_2eproto[1]; +} +PROTOBUF_CONSTINIT const uint32_t CommandAnswer_internal_data_[] = { + 131072u, 0u, }; +bool CommandAnswer_IsValid(int value) { + return 0 <= value && value <= 1; +} +// =================================================================== + +class SubscribeArmAuthorizationRequest::_Internal { + public: +}; + +SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationRequest) +} +SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest( + ::google::protobuf::Arena* arena, + const SubscribeArmAuthorizationRequest& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + SubscribeArmAuthorizationRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationRequest) +} + + + + + + + + + +::google::protobuf::Metadata SubscribeArmAuthorizationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_getter, &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once, + file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto[0]); +} +// =================================================================== + +class SubscribeArmAuthorizationResponse::_Internal { + public: +}; + +SubscribeArmAuthorizationResponse::SubscribeArmAuthorizationResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) +} +SubscribeArmAuthorizationResponse::SubscribeArmAuthorizationResponse( + ::google::protobuf::Arena* arena, const SubscribeArmAuthorizationResponse& from) + : SubscribeArmAuthorizationResponse(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE SubscribeArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void SubscribeArmAuthorizationResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.system_id_ = {}; +} +SubscribeArmAuthorizationResponse::~SubscribeArmAuthorizationResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void SubscribeArmAuthorizationResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void SubscribeArmAuthorizationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.system_id_ = 0u; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* SubscribeArmAuthorizationResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> SubscribeArmAuthorizationResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_SubscribeArmAuthorizationResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint32 system_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SubscribeArmAuthorizationResponse, _impl_.system_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(SubscribeArmAuthorizationResponse, _impl_.system_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 system_id = 1; + {PROTOBUF_FIELD_OFFSET(SubscribeArmAuthorizationResponse, _impl_.system_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* SubscribeArmAuthorizationResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint32 system_id = 1; + if (this->_internal_system_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this->_internal_system_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + return target; +} + +::size_t SubscribeArmAuthorizationResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 system_id = 1; + if (this->_internal_system_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this->_internal_system_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData SubscribeArmAuthorizationResponse::_class_data_ = { + SubscribeArmAuthorizationResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* SubscribeArmAuthorizationResponse::GetClassData() const { + return &_class_data_; +} + +void SubscribeArmAuthorizationResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_system_id() != 0) { + _this->_internal_set_system_id(from._internal_system_id()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void SubscribeArmAuthorizationResponse::CopyFrom(const SubscribeArmAuthorizationResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool SubscribeArmAuthorizationResponse::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* SubscribeArmAuthorizationResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void SubscribeArmAuthorizationResponse::InternalSwap(SubscribeArmAuthorizationResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.system_id_, other->_impl_.system_id_); +} + +::google::protobuf::Metadata SubscribeArmAuthorizationResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_getter, &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once, + file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto[1]); +} +// =================================================================== + +class RespondArmAuthorizationRequest::_Internal { + public: +}; + +RespondArmAuthorizationRequest::RespondArmAuthorizationRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) +} +RespondArmAuthorizationRequest::RespondArmAuthorizationRequest( + ::google::protobuf::Arena* arena, const RespondArmAuthorizationRequest& from) + : RespondArmAuthorizationRequest(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE RespondArmAuthorizationRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void RespondArmAuthorizationRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.arm_authorizer_decision_ = {}; +} +RespondArmAuthorizationRequest::~RespondArmAuthorizationRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void RespondArmAuthorizationRequest::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void RespondArmAuthorizationRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.arm_authorizer_decision_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RespondArmAuthorizationRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> RespondArmAuthorizationRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RespondArmAuthorizationRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RespondArmAuthorizationRequest, _impl_.arm_authorizer_decision_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RespondArmAuthorizationRequest, _impl_.arm_authorizer_decision_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; + {PROTOBUF_FIELD_OFFSET(RespondArmAuthorizationRequest, _impl_.arm_authorizer_decision_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RespondArmAuthorizationRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; + if (this->_internal_arm_authorizer_decision() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_arm_authorizer_decision(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + return target; +} + +::size_t RespondArmAuthorizationRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; + if (this->_internal_arm_authorizer_decision() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_arm_authorizer_decision()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData RespondArmAuthorizationRequest::_class_data_ = { + RespondArmAuthorizationRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* RespondArmAuthorizationRequest::GetClassData() const { + return &_class_data_; +} + +void RespondArmAuthorizationRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_arm_authorizer_decision() != 0) { + _this->_internal_set_arm_authorizer_decision(from._internal_arm_authorizer_decision()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void RespondArmAuthorizationRequest::CopyFrom(const RespondArmAuthorizationRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool RespondArmAuthorizationRequest::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* RespondArmAuthorizationRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RespondArmAuthorizationRequest::InternalSwap(RespondArmAuthorizationRequest* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.arm_authorizer_decision_, other->_impl_.arm_authorizer_decision_); +} + +::google::protobuf::Metadata RespondArmAuthorizationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_getter, &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once, + file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto[2]); +} +// =================================================================== + +class RespondArmAuthorizationResponse::_Internal { + public: +}; + +RespondArmAuthorizationResponse::RespondArmAuthorizationResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) +} +RespondArmAuthorizationResponse::RespondArmAuthorizationResponse( + ::google::protobuf::Arena* arena, const RespondArmAuthorizationResponse& from) + : RespondArmAuthorizationResponse(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE RespondArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void RespondArmAuthorizationResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.command_answer_ = {}; +} +RespondArmAuthorizationResponse::~RespondArmAuthorizationResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void RespondArmAuthorizationResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void RespondArmAuthorizationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.command_answer_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RespondArmAuthorizationResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> RespondArmAuthorizationResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RespondArmAuthorizationResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RespondArmAuthorizationResponse, _impl_.command_answer_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RespondArmAuthorizationResponse, _impl_.command_answer_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; + {PROTOBUF_FIELD_OFFSET(RespondArmAuthorizationResponse, _impl_.command_answer_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RespondArmAuthorizationResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; + if (this->_internal_command_answer() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_command_answer(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + return target; +} + +::size_t RespondArmAuthorizationResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; + if (this->_internal_command_answer() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_command_answer()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData RespondArmAuthorizationResponse::_class_data_ = { + RespondArmAuthorizationResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* RespondArmAuthorizationResponse::GetClassData() const { + return &_class_data_; +} + +void RespondArmAuthorizationResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_command_answer() != 0) { + _this->_internal_set_command_answer(from._internal_command_answer()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void RespondArmAuthorizationResponse::CopyFrom(const RespondArmAuthorizationResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool RespondArmAuthorizationResponse::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* RespondArmAuthorizationResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RespondArmAuthorizationResponse::InternalSwap(RespondArmAuthorizationResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.command_answer_, other->_impl_.command_answer_); +} + +::google::protobuf::Metadata RespondArmAuthorizationResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_getter, &descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto_once, + file_level_metadata_arm_5fauthorizer_2farm_5fauthorizer_2eproto[3]); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace arm_authorizer +} // namespace rpc +} // namespace mavsdk +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +#include "google/protobuf/port_undef.inc" diff --git a/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.h b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.h new file mode 100644 index 0000000000..09c4f2759e --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer/arm_authorizer.pb.h @@ -0,0 +1,951 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: arm_authorizer/arm_authorizer.proto +// Protobuf C++ Version: 4.25.1 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_2farm_5fauthorizer_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_2farm_5fauthorizer_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#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 // PROTOBUF_VERSION + +#if 4025001 < 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 // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_bases.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +#include "mavsdk_options.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_arm_5fauthorizer_2farm_5fauthorizer_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { +class RespondArmAuthorizationRequest; +struct RespondArmAuthorizationRequestDefaultTypeInternal; +extern RespondArmAuthorizationRequestDefaultTypeInternal _RespondArmAuthorizationRequest_default_instance_; +class RespondArmAuthorizationResponse; +struct RespondArmAuthorizationResponseDefaultTypeInternal; +extern RespondArmAuthorizationResponseDefaultTypeInternal _RespondArmAuthorizationResponse_default_instance_; +class SubscribeArmAuthorizationRequest; +struct SubscribeArmAuthorizationRequestDefaultTypeInternal; +extern SubscribeArmAuthorizationRequestDefaultTypeInternal _SubscribeArmAuthorizationRequest_default_instance_; +class SubscribeArmAuthorizationResponse; +struct SubscribeArmAuthorizationResponseDefaultTypeInternal; +extern SubscribeArmAuthorizationResponseDefaultTypeInternal _SubscribeArmAuthorizationResponse_default_instance_; +} // namespace arm_authorizer +} // namespace rpc +} // namespace mavsdk +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace mavsdk { +namespace rpc { +namespace arm_authorizer { +enum ArmAuthorizerDecision : int { + DECISION_ACCEPTED = 0, + DECISION_TEMPORARILY_REJECTED = 1, + DECISION_DENIED = 2, + ArmAuthorizerDecision_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + ArmAuthorizerDecision_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool ArmAuthorizerDecision_IsValid(int value); +extern const uint32_t ArmAuthorizerDecision_internal_data_[]; +constexpr ArmAuthorizerDecision ArmAuthorizerDecision_MIN = static_cast(0); +constexpr ArmAuthorizerDecision ArmAuthorizerDecision_MAX = static_cast(2); +constexpr int ArmAuthorizerDecision_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +ArmAuthorizerDecision_descriptor(); +template +const std::string& ArmAuthorizerDecision_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to ArmAuthorizerDecision_Name()."); + return ArmAuthorizerDecision_Name(static_cast(value)); +} +template <> +inline const std::string& ArmAuthorizerDecision_Name(ArmAuthorizerDecision value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool ArmAuthorizerDecision_Parse(absl::string_view name, ArmAuthorizerDecision* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ArmAuthorizerDecision_descriptor(), name, value); +} +enum CommandAnswer : int { + COMMAND_ANSWER_ACCEPTED = 0, + COMMAND_ANSWER_FAILED = 1, + CommandAnswer_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + CommandAnswer_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool CommandAnswer_IsValid(int value); +extern const uint32_t CommandAnswer_internal_data_[]; +constexpr CommandAnswer CommandAnswer_MIN = static_cast(0); +constexpr CommandAnswer CommandAnswer_MAX = static_cast(1); +constexpr int CommandAnswer_ARRAYSIZE = 1 + 1; +const ::google::protobuf::EnumDescriptor* +CommandAnswer_descriptor(); +template +const std::string& CommandAnswer_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to CommandAnswer_Name()."); + return CommandAnswer_Name(static_cast(value)); +} +template <> +inline const std::string& CommandAnswer_Name(CommandAnswer value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool CommandAnswer_Parse(absl::string_view name, CommandAnswer* value) { + return ::google::protobuf::internal::ParseNamedEnum( + CommandAnswer_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class SubscribeArmAuthorizationResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) */ { + public: + inline SubscribeArmAuthorizationResponse() : SubscribeArmAuthorizationResponse(nullptr) {} + ~SubscribeArmAuthorizationResponse() override; + template + explicit PROTOBUF_CONSTEXPR SubscribeArmAuthorizationResponse(::google::protobuf::internal::ConstantInitialized); + + inline SubscribeArmAuthorizationResponse(const SubscribeArmAuthorizationResponse& from) + : SubscribeArmAuthorizationResponse(nullptr, from) {} + SubscribeArmAuthorizationResponse(SubscribeArmAuthorizationResponse&& from) noexcept + : SubscribeArmAuthorizationResponse() { + *this = ::std::move(from); + } + + inline SubscribeArmAuthorizationResponse& operator=(const SubscribeArmAuthorizationResponse& from) { + CopyFrom(from); + return *this; + } + inline SubscribeArmAuthorizationResponse& operator=(SubscribeArmAuthorizationResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SubscribeArmAuthorizationResponse& default_instance() { + return *internal_default_instance(); + } + static inline const SubscribeArmAuthorizationResponse* internal_default_instance() { + return reinterpret_cast( + &_SubscribeArmAuthorizationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(SubscribeArmAuthorizationResponse& a, SubscribeArmAuthorizationResponse& b) { + a.Swap(&b); + } + inline void Swap(SubscribeArmAuthorizationResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SubscribeArmAuthorizationResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SubscribeArmAuthorizationResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const SubscribeArmAuthorizationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const SubscribeArmAuthorizationResponse& from) { + SubscribeArmAuthorizationResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(SubscribeArmAuthorizationResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse"; + } + protected: + explicit SubscribeArmAuthorizationResponse(::google::protobuf::Arena* arena); + SubscribeArmAuthorizationResponse(::google::protobuf::Arena* arena, const SubscribeArmAuthorizationResponse& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSystemIdFieldNumber = 1, + }; + // uint32 system_id = 1; + void clear_system_id() ; + ::uint32_t system_id() const; + void set_system_id(::uint32_t value); + + private: + ::uint32_t _internal_system_id() const; + void _internal_set_system_id(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint32_t system_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +};// ------------------------------------------------------------------- + +class SubscribeArmAuthorizationRequest final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationRequest) */ { + public: + inline SubscribeArmAuthorizationRequest() : SubscribeArmAuthorizationRequest(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequest(::google::protobuf::internal::ConstantInitialized); + + inline SubscribeArmAuthorizationRequest(const SubscribeArmAuthorizationRequest& from) + : SubscribeArmAuthorizationRequest(nullptr, from) {} + SubscribeArmAuthorizationRequest(SubscribeArmAuthorizationRequest&& from) noexcept + : SubscribeArmAuthorizationRequest() { + *this = ::std::move(from); + } + + inline SubscribeArmAuthorizationRequest& operator=(const SubscribeArmAuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline SubscribeArmAuthorizationRequest& operator=(SubscribeArmAuthorizationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SubscribeArmAuthorizationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SubscribeArmAuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_SubscribeArmAuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SubscribeArmAuthorizationRequest& a, SubscribeArmAuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(SubscribeArmAuthorizationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SubscribeArmAuthorizationRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SubscribeArmAuthorizationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const SubscribeArmAuthorizationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const SubscribeArmAuthorizationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationRequest"; + } + protected: + explicit SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena); + SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena, const SubscribeArmAuthorizationRequest& from); + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationRequest) + private: + class _Internal; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +};// ------------------------------------------------------------------- + +class RespondArmAuthorizationResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) */ { + public: + inline RespondArmAuthorizationResponse() : RespondArmAuthorizationResponse(nullptr) {} + ~RespondArmAuthorizationResponse() override; + template + explicit PROTOBUF_CONSTEXPR RespondArmAuthorizationResponse(::google::protobuf::internal::ConstantInitialized); + + inline RespondArmAuthorizationResponse(const RespondArmAuthorizationResponse& from) + : RespondArmAuthorizationResponse(nullptr, from) {} + RespondArmAuthorizationResponse(RespondArmAuthorizationResponse&& from) noexcept + : RespondArmAuthorizationResponse() { + *this = ::std::move(from); + } + + inline RespondArmAuthorizationResponse& operator=(const RespondArmAuthorizationResponse& from) { + CopyFrom(from); + return *this; + } + inline RespondArmAuthorizationResponse& operator=(RespondArmAuthorizationResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RespondArmAuthorizationResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RespondArmAuthorizationResponse* internal_default_instance() { + return reinterpret_cast( + &_RespondArmAuthorizationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(RespondArmAuthorizationResponse& a, RespondArmAuthorizationResponse& b) { + a.Swap(&b); + } + inline void Swap(RespondArmAuthorizationResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RespondArmAuthorizationResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RespondArmAuthorizationResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RespondArmAuthorizationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RespondArmAuthorizationResponse& from) { + RespondArmAuthorizationResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(RespondArmAuthorizationResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse"; + } + protected: + explicit RespondArmAuthorizationResponse(::google::protobuf::Arena* arena); + RespondArmAuthorizationResponse(::google::protobuf::Arena* arena, const RespondArmAuthorizationResponse& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCommandAnswerFieldNumber = 1, + }; + // .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; + void clear_command_answer() ; + ::mavsdk::rpc::arm_authorizer::CommandAnswer command_answer() const; + void set_command_answer(::mavsdk::rpc::arm_authorizer::CommandAnswer value); + + private: + ::mavsdk::rpc::arm_authorizer::CommandAnswer _internal_command_answer() const; + void _internal_set_command_answer(::mavsdk::rpc::arm_authorizer::CommandAnswer value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + int command_answer_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +};// ------------------------------------------------------------------- + +class RespondArmAuthorizationRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) */ { + public: + inline RespondArmAuthorizationRequest() : RespondArmAuthorizationRequest(nullptr) {} + ~RespondArmAuthorizationRequest() override; + template + explicit PROTOBUF_CONSTEXPR RespondArmAuthorizationRequest(::google::protobuf::internal::ConstantInitialized); + + inline RespondArmAuthorizationRequest(const RespondArmAuthorizationRequest& from) + : RespondArmAuthorizationRequest(nullptr, from) {} + RespondArmAuthorizationRequest(RespondArmAuthorizationRequest&& from) noexcept + : RespondArmAuthorizationRequest() { + *this = ::std::move(from); + } + + inline RespondArmAuthorizationRequest& operator=(const RespondArmAuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline RespondArmAuthorizationRequest& operator=(RespondArmAuthorizationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RespondArmAuthorizationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RespondArmAuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_RespondArmAuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(RespondArmAuthorizationRequest& a, RespondArmAuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(RespondArmAuthorizationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RespondArmAuthorizationRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RespondArmAuthorizationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RespondArmAuthorizationRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RespondArmAuthorizationRequest& from) { + RespondArmAuthorizationRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(RespondArmAuthorizationRequest* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest"; + } + protected: + explicit RespondArmAuthorizationRequest(::google::protobuf::Arena* arena); + RespondArmAuthorizationRequest(::google::protobuf::Arena* arena, const RespondArmAuthorizationRequest& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArmAuthorizerDecisionFieldNumber = 1, + }; + // .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; + void clear_arm_authorizer_decision() ; + ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision arm_authorizer_decision() const; + void set_arm_authorizer_decision(::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision value); + + private: + ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision _internal_arm_authorizer_decision() const; + void _internal_set_arm_authorizer_decision(::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + int arm_authorizer_decision_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_2farm_5fauthorizer_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// SubscribeArmAuthorizationRequest + +// ------------------------------------------------------------------- + +// SubscribeArmAuthorizationResponse + +// uint32 system_id = 1; +inline void SubscribeArmAuthorizationResponse::clear_system_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.system_id_ = 0u; +} +inline ::uint32_t SubscribeArmAuthorizationResponse::system_id() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse.system_id) + return _internal_system_id(); +} +inline void SubscribeArmAuthorizationResponse::set_system_id(::uint32_t value) { + _internal_set_system_id(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer.SubscribeArmAuthorizationResponse.system_id) +} +inline ::uint32_t SubscribeArmAuthorizationResponse::_internal_system_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.system_id_; +} +inline void SubscribeArmAuthorizationResponse::_internal_set_system_id(::uint32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.system_id_ = value; +} + +// ------------------------------------------------------------------- + +// RespondArmAuthorizationRequest + +// .mavsdk.rpc.arm_authorizer.ArmAuthorizerDecision arm_authorizer_decision = 1; +inline void RespondArmAuthorizationRequest::clear_arm_authorizer_decision() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.arm_authorizer_decision_ = 0; +} +inline ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision RespondArmAuthorizationRequest::arm_authorizer_decision() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest.arm_authorizer_decision) + return _internal_arm_authorizer_decision(); +} +inline void RespondArmAuthorizationRequest::set_arm_authorizer_decision(::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision value) { + _internal_set_arm_authorizer_decision(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationRequest.arm_authorizer_decision) +} +inline ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision RespondArmAuthorizationRequest::_internal_arm_authorizer_decision() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision>(_impl_.arm_authorizer_decision_); +} +inline void RespondArmAuthorizationRequest::_internal_set_arm_authorizer_decision(::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.arm_authorizer_decision_ = value; +} + +// ------------------------------------------------------------------- + +// RespondArmAuthorizationResponse + +// .mavsdk.rpc.arm_authorizer.CommandAnswer command_answer = 1; +inline void RespondArmAuthorizationResponse::clear_command_answer() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.command_answer_ = 0; +} +inline ::mavsdk::rpc::arm_authorizer::CommandAnswer RespondArmAuthorizationResponse::command_answer() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse.command_answer) + return _internal_command_answer(); +} +inline void RespondArmAuthorizationResponse::set_command_answer(::mavsdk::rpc::arm_authorizer::CommandAnswer value) { + _internal_set_command_answer(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer.RespondArmAuthorizationResponse.command_answer) +} +inline ::mavsdk::rpc::arm_authorizer::CommandAnswer RespondArmAuthorizationResponse::_internal_command_answer() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::mavsdk::rpc::arm_authorizer::CommandAnswer>(_impl_.command_answer_); +} +inline void RespondArmAuthorizationResponse::_internal_set_command_answer(::mavsdk::rpc::arm_authorizer::CommandAnswer value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.command_answer_ = value; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace arm_authorizer +} // namespace rpc +} // namespace mavsdk + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision>() { + return ::mavsdk::rpc::arm_authorizer::ArmAuthorizerDecision_descriptor(); +} +template <> +struct is_proto_enum<::mavsdk::rpc::arm_authorizer::CommandAnswer> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::mavsdk::rpc::arm_authorizer::CommandAnswer>() { + return ::mavsdk::rpc::arm_authorizer::CommandAnswer_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_2farm_5fauthorizer_2eproto_2epb_2eh diff --git a/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.cc b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.cc new file mode 100644 index 0000000000..ff325ea99f --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.cc @@ -0,0 +1,167 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: arm_authorizer_server/arm_authorizer_server.proto + +#include "arm_authorizer_server/arm_authorizer_server.pb.h" +#include "arm_authorizer_server/arm_authorizer_server.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { + +static const char* ArmAuthorizerServerService_method_names[] = { + "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/SubscribeArmAuthorization", + "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/AcceptArmAuthorization", + "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/RejectArmAuthorization", +}; + +std::unique_ptr< ArmAuthorizerServerService::Stub> ArmAuthorizerServerService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< ArmAuthorizerServerService::Stub> stub(new ArmAuthorizerServerService::Stub(channel, options)); + return stub; +} + +ArmAuthorizerServerService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_SubscribeArmAuthorization_(ArmAuthorizerServerService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_AcceptArmAuthorization_(ArmAuthorizerServerService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RejectArmAuthorization_(ArmAuthorizerServerService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::ClientReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request) { + return ::grpc::internal::ClientReaderFactory< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>::Create(channel_.get(), rpcmethod_SubscribeArmAuthorization_, context, request); +} + +void ArmAuthorizerServerService::Stub::async::SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_SubscribeArmAuthorization_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeArmAuthorization_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeArmAuthorization_, context, request, false, nullptr); +} + +::grpc::Status ArmAuthorizerServerService::Stub::AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AcceptArmAuthorization_, context, request, response); +} + +void ArmAuthorizerServerService::Stub::async::AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AcceptArmAuthorization_, context, request, response, std::move(f)); +} + +void ArmAuthorizerServerService::Stub::async::AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AcceptArmAuthorization_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::PrepareAsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AcceptArmAuthorization_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::AsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAcceptArmAuthorizationRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ArmAuthorizerServerService::Stub::RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RejectArmAuthorization_, context, request, response); +} + +void ArmAuthorizerServerService::Stub::async::RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RejectArmAuthorization_, context, request, response, std::move(f)); +} + +void ArmAuthorizerServerService::Stub::async::RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RejectArmAuthorization_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::PrepareAsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RejectArmAuthorization_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* ArmAuthorizerServerService::Stub::AsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRejectArmAuthorizationRaw(context, request, cq); + result->StartCall(); + return result; +} + +ArmAuthorizerServerService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + ArmAuthorizerServerService_method_names[0], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< ArmAuthorizerServerService::Service, ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>( + [](ArmAuthorizerServerService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* req, + ::grpc::ServerWriter<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* writer) { + return service->SubscribeArmAuthorization(ctx, req, writer); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ArmAuthorizerServerService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ArmAuthorizerServerService::Service, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ArmAuthorizerServerService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* req, + ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* resp) { + return service->AcceptArmAuthorization(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ArmAuthorizerServerService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ArmAuthorizerServerService::Service, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ArmAuthorizerServerService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* req, + ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* resp) { + return service->RejectArmAuthorization(ctx, req, resp); + }, this))); +} + +ArmAuthorizerServerService::Service::~Service() { +} + +::grpc::Status ArmAuthorizerServerService::Service::SubscribeArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ArmAuthorizerServerService::Service::AcceptArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ArmAuthorizerServerService::Service::RejectArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace mavsdk +} // namespace rpc +} // namespace arm_authorizer_server + diff --git a/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.h b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.h new file mode 100644 index 0000000000..f33c4a664c --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.grpc.pb.h @@ -0,0 +1,566 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: arm_authorizer_server/arm_authorizer_server.proto +#ifndef GRPC_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto__INCLUDED +#define GRPC_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto__INCLUDED + +#include "arm_authorizer_server/arm_authorizer_server.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { + +class ArmAuthorizerServerService final { + public: + static constexpr char const* service_full_name() { + return "mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(SubscribeArmAuthorizationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> AsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(AsyncSubscribeArmAuthorizationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> PrepareAsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(PrepareAsyncSubscribeArmAuthorizationRaw(context, request, cq)); + } + // Authorize arm for the specific time + virtual ::grpc::Status AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>> AsyncAcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>>(AsyncAcceptArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>> PrepareAsyncAcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>>(PrepareAsyncAcceptArmAuthorizationRaw(context, request, cq)); + } + // Reject arm authorization request + virtual ::grpc::Status RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>> AsyncRejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>>(AsyncRejectArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>> PrepareAsyncRejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>>(PrepareAsyncRejectArmAuthorizationRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + virtual void SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* reactor) = 0; + // Authorize arm for the specific time + virtual void AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, std::function) = 0; + virtual void AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // Reject arm authorization request + virtual void RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response, std::function) = 0; + virtual void RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* 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< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* AsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* PrepareAsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* AsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* PrepareAsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& 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< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request) { + return std::unique_ptr< ::grpc::ClientReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(SubscribeArmAuthorizationRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> AsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(AsyncSubscribeArmAuthorizationRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>> PrepareAsyncSubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>>(PrepareAsyncSubscribeArmAuthorizationRaw(context, request, cq)); + } + ::grpc::Status AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>> AsyncAcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>>(AsyncAcceptArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>> PrepareAsyncAcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>>(PrepareAsyncAcceptArmAuthorizationRaw(context, request, cq)); + } + ::grpc::Status RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>> AsyncRejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>>(AsyncRejectArmAuthorizationRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>> PrepareAsyncRejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>>(PrepareAsyncRejectArmAuthorizationRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void SubscribeArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* reactor) override; + void AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, std::function) override; + void AcceptArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response, std::function) override; + void RejectArmAuthorization(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* 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< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* SubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* AsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* PrepareAsyncSubscribeArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* AsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* PrepareAsyncAcceptArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* AsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* PrepareAsyncRejectArmAuthorizationRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_SubscribeArmAuthorization_; + const ::grpc::internal::RpcMethod rpcmethod_AcceptArmAuthorization_; + const ::grpc::internal::RpcMethod rpcmethod_RejectArmAuthorization_; + }; + 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(); + // Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization + virtual ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* writer); + // Authorize arm for the specific time + virtual ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response); + // Reject arm authorization request + virtual ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response); + }; + template + class WithAsyncMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeArmAuthorization(::grpc::ServerContext* context, ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request, ::grpc::ServerAsyncWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* 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_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AcceptArmAuthorization() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAcceptArmAuthorization(::grpc::ServerContext* context, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* 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_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RejectArmAuthorization() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRejectArmAuthorization(::grpc::ServerContext* context, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* 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); + } + }; + typedef WithAsyncMethod_SubscribeArmAuthorization > > AsyncService; + template + class WithCallbackMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* request) { return this->SubscribeArmAuthorization(context, request); })); + } + ~WithCallbackMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* SubscribeArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/) { return nullptr; } + }; + template + class WithCallbackMethod_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AcceptArmAuthorization() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) { return this->AcceptArmAuthorization(context, request, response); }));} + void SetMessageAllocatorFor_AcceptArmAuthorization( + ::grpc::MessageAllocator< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AcceptArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RejectArmAuthorization() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) { return this->RejectArmAuthorization(context, request, response); }));} + void SetMessageAllocatorFor_RejectArmAuthorization( + ::grpc::MessageAllocator< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RejectArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_SubscribeArmAuthorization > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AcceptArmAuthorization() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RejectArmAuthorization() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeArmAuthorization(::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_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AcceptArmAuthorization() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAcceptArmAuthorization(::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_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RejectArmAuthorization() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRejectArmAuthorization(::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 WithRawCallbackMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->SubscribeArmAuthorization(context, request); })); + } + ~WithRawCallbackMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* SubscribeArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AcceptArmAuthorization() { + ::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->AcceptArmAuthorization(context, request, response); })); + } + ~WithRawCallbackMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AcceptArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RejectArmAuthorization() { + ::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->RejectArmAuthorization(context, request, response); })); + } + ~WithRawCallbackMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RejectArmAuthorization( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_AcceptArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AcceptArmAuthorization() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* streamer) { + return this->StreamedAcceptArmAuthorization(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AcceptArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AcceptArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAcceptArmAuthorization(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest,::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RejectArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RejectArmAuthorization() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* streamer) { + return this->StreamedRejectArmAuthorization(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RejectArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RejectArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest* /*request*/, ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRejectArmAuthorization(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest,::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_AcceptArmAuthorization > StreamedUnaryService; + template + class WithSplitStreamingMethod_SubscribeArmAuthorization : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_SubscribeArmAuthorization() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::SplitServerStreamingHandler< + ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerSplitStreamer< + ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest, ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* streamer) { + return this->StreamedSubscribeArmAuthorization(context, + streamer); + })); + } + ~WithSplitStreamingMethod_SubscribeArmAuthorization() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SubscribeArmAuthorization(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSubscribeArmAuthorization(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest,::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_SubscribeArmAuthorization SplitStreamedService; + typedef WithSplitStreamingMethod_SubscribeArmAuthorization > > StreamedService; +}; + +} // namespace arm_authorizer_server +} // namespace rpc +} // namespace mavsdk + + +#endif // GRPC_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto__INCLUDED diff --git a/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.cc b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.cc new file mode 100644 index 0000000000..3972b19909 --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.cc @@ -0,0 +1,1612 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: arm_authorizer_server/arm_authorizer_server.proto + +#include "arm_authorizer_server/arm_authorizer_server.pb.h" + +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { + template +PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest(::_pbi::ConstantInitialized) {} +struct SubscribeArmAuthorizationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SubscribeArmAuthorizationRequestDefaultTypeInternal() {} + union { + SubscribeArmAuthorizationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SubscribeArmAuthorizationRequestDefaultTypeInternal _SubscribeArmAuthorizationRequest_default_instance_; + +inline constexpr RejectArmAuthorizationRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : temporarily_{false}, + reason_{static_cast< ::mavsdk::rpc::arm_authorizer_server::RejectionReason >(0)}, + extra_info_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RejectArmAuthorizationRequest::RejectArmAuthorizationRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RejectArmAuthorizationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RejectArmAuthorizationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RejectArmAuthorizationRequestDefaultTypeInternal() {} + union { + RejectArmAuthorizationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RejectArmAuthorizationRequestDefaultTypeInternal _RejectArmAuthorizationRequest_default_instance_; + +inline constexpr ArmAuthorizerServerResult::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : result_str_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + result_{static_cast< ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result >(0)}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR ArmAuthorizerServerResult::ArmAuthorizerServerResult(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct ArmAuthorizerServerResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArmAuthorizerServerResultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ArmAuthorizerServerResultDefaultTypeInternal() {} + union { + ArmAuthorizerServerResult _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArmAuthorizerServerResultDefaultTypeInternal _ArmAuthorizerServerResult_default_instance_; + +inline constexpr ArmAuthorizationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : system_id_{0u}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR ArmAuthorizationResponse::ArmAuthorizationResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct ArmAuthorizationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArmAuthorizationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ArmAuthorizationResponseDefaultTypeInternal() {} + union { + ArmAuthorizationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArmAuthorizationResponseDefaultTypeInternal _ArmAuthorizationResponse_default_instance_; + +inline constexpr AcceptArmAuthorizationRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : valid_time_s_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR AcceptArmAuthorizationRequest::AcceptArmAuthorizationRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct AcceptArmAuthorizationRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR AcceptArmAuthorizationRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~AcceptArmAuthorizationRequestDefaultTypeInternal() {} + union { + AcceptArmAuthorizationRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AcceptArmAuthorizationRequestDefaultTypeInternal _AcceptArmAuthorizationRequest_default_instance_; + +inline constexpr RejectArmAuthorizationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + arm_authorizer_server_result_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RejectArmAuthorizationResponse::RejectArmAuthorizationResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RejectArmAuthorizationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RejectArmAuthorizationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RejectArmAuthorizationResponseDefaultTypeInternal() {} + union { + RejectArmAuthorizationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RejectArmAuthorizationResponseDefaultTypeInternal _RejectArmAuthorizationResponse_default_instance_; + +inline constexpr AcceptArmAuthorizationResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + arm_authorizer_server_result_{nullptr} {} + +template +PROTOBUF_CONSTEXPR AcceptArmAuthorizationResponse::AcceptArmAuthorizationResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct AcceptArmAuthorizationResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR AcceptArmAuthorizationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~AcceptArmAuthorizationResponseDefaultTypeInternal() {} + union { + AcceptArmAuthorizationResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AcceptArmAuthorizationResponseDefaultTypeInternal _AcceptArmAuthorizationResponse_default_instance_; +} // namespace arm_authorizer_server +} // namespace rpc +} // namespace mavsdk +static ::_pb::Metadata file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[7]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[2]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto = nullptr; +const ::uint32_t TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse, _impl_.system_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest, _impl_.valid_time_s_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse, _impl_.arm_authorizer_server_result_), + 0, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, _impl_.temporarily_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, _impl_.reason_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest, _impl_.extra_info_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse, _impl_.arm_authorizer_server_result_), + 0, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult, _impl_.result_str_), +}; + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest)}, + {8, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizationResponse)}, + {17, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationRequest)}, + {26, 35, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::AcceptArmAuthorizationResponse)}, + {36, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationRequest)}, + {47, 56, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::RejectArmAuthorizationResponse)}, + {57, -1, -1, sizeof(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::mavsdk::rpc::arm_authorizer_server::_SubscribeArmAuthorizationRequest_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_ArmAuthorizationResponse_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_AcceptArmAuthorizationRequest_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_AcceptArmAuthorizationResponse_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_RejectArmAuthorizationRequest_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_RejectArmAuthorizationResponse_default_instance_._instance, + &::mavsdk::rpc::arm_authorizer_server::_ArmAuthorizerServerResult_default_instance_._instance, +}; +const char descriptor_table_protodef_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n1arm_authorizer_server/arm_authorizer_s" + "erver.proto\022 mavsdk.rpc.arm_authorizer_s" + "erver\032\024mavsdk_options.proto\"\"\n Subscribe" + "ArmAuthorizationRequest\"-\n\030ArmAuthorizat" + "ionResponse\022\021\n\tsystem_id\030\001 \001(\r\"5\n\035Accept" + "ArmAuthorizationRequest\022\024\n\014valid_time_s\030" + "\001 \001(\005\"\203\001\n\036AcceptArmAuthorizationResponse" + "\022a\n\034arm_authorizer_server_result\030\001 \001(\0132;" + ".mavsdk.rpc.arm_authorizer_server.ArmAut" + "horizerServerResult\"\213\001\n\035RejectArmAuthori" + "zationRequest\022\023\n\013temporarily\030\001 \001(\010\022A\n\006re" + "ason\030\002 \001(\01621.mavsdk.rpc.arm_authorizer_s" + "erver.RejectionReason\022\022\n\nextra_info\030\003 \001(" + "\005\"\203\001\n\036RejectArmAuthorizationResponse\022a\n\034" + "arm_authorizer_server_result\030\001 \001(\0132;.mav" + "sdk.rpc.arm_authorizer_server.ArmAuthori" + "zerServerResult\"\310\001\n\031ArmAuthorizerServerR" + "esult\022R\n\006result\030\001 \001(\0162B.mavsdk.rpc.arm_a" + "uthorizer_server.ArmAuthorizerServerResu" + "lt.Result\022\022\n\nresult_str\030\002 \001(\t\"C\n\006Result\022" + "\022\n\016RESULT_UNKNOWN\020\000\022\022\n\016RESULT_SUCCESS\020\001\022" + "\021\n\rRESULT_FAILED\020\002*\327\001\n\017RejectionReason\022\034" + "\n\030REJECTION_REASON_GENERIC\020\000\022\031\n\025REJECTIO" + "N_REASON_NONE\020\001\022%\n!REJECTION_REASON_INVA" + "LID_WAYPOINT\020\002\022\034\n\030REJECTION_REASON_TIMEO" + "UT\020\003\022$\n REJECTION_REASON_AIRSPACE_IN_USE" + "\020\004\022 \n\034REJECTION_REASON_BAD_WEATHER\020\0052\212\004\n" + "\032ArmAuthorizerServerService\022\243\001\n\031Subscrib" + "eArmAuthorization\022B.mavsdk.rpc.arm_autho" + "rizer_server.SubscribeArmAuthorizationRe" + "quest\032:.mavsdk.rpc.arm_authorizer_server" + ".ArmAuthorizationResponse\"\004\200\265\030\0000\001\022\241\001\n\026Ac" + "ceptArmAuthorization\022\?.mavsdk.rpc.arm_au" + "thorizer_server.AcceptArmAuthorizationRe" + "quest\032@.mavsdk.rpc.arm_authorizer_server" + ".AcceptArmAuthorizationResponse\"\004\200\265\030\001\022\241\001" + "\n\026RejectArmAuthorization\022\?.mavsdk.rpc.ar" + "m_authorizer_server.RejectArmAuthorizati" + "onRequest\032@.mavsdk.rpc.arm_authorizer_se" + "rver.RejectArmAuthorizationResponse\"\004\200\265\030" + "\001B4\n\030io.mavsdk.arm_authorizerB\030ArmAuthor" + "izerServerProtob\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_deps[1] = + { + &::descriptor_table_mavsdk_5foptions_2eproto, +}; +static ::absl::once_flag descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto = { + false, + false, + 1663, + descriptor_table_protodef_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto, + "arm_authorizer_server/arm_authorizer_server.proto", + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_deps, + 1, + 7, + schemas, + file_default_instances, + TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto::offsets, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto, + file_level_enum_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto, + file_level_service_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto, +}; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter() { + return &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +} +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto(&descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto); +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { +const ::google::protobuf::EnumDescriptor* ArmAuthorizerServerResult_Result_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto); + return file_level_enum_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t ArmAuthorizerServerResult_Result_internal_data_[] = { + 196608u, 0u, }; +bool ArmAuthorizerServerResult_Result_IsValid(int value) { + return 0 <= value && value <= 2; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::RESULT_UNKNOWN; +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::RESULT_SUCCESS; +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::RESULT_FAILED; +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::Result_MIN; +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::Result_MAX; +constexpr int ArmAuthorizerServerResult::Result_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::google::protobuf::EnumDescriptor* RejectionReason_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto); + return file_level_enum_descriptors_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[1]; +} +PROTOBUF_CONSTINIT const uint32_t RejectionReason_internal_data_[] = { + 393216u, 0u, }; +bool RejectionReason_IsValid(int value) { + return 0 <= value && value <= 5; +} +// =================================================================== + +class SubscribeArmAuthorizationRequest::_Internal { + public: +}; + +SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.SubscribeArmAuthorizationRequest) +} +SubscribeArmAuthorizationRequest::SubscribeArmAuthorizationRequest( + ::google::protobuf::Arena* arena, + const SubscribeArmAuthorizationRequest& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + SubscribeArmAuthorizationRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.arm_authorizer_server.SubscribeArmAuthorizationRequest) +} + + + + + + + + + +::google::protobuf::Metadata SubscribeArmAuthorizationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[0]); +} +// =================================================================== + +class ArmAuthorizationResponse::_Internal { + public: +}; + +ArmAuthorizationResponse::ArmAuthorizationResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) +} +ArmAuthorizationResponse::ArmAuthorizationResponse( + ::google::protobuf::Arena* arena, const ArmAuthorizationResponse& from) + : ArmAuthorizationResponse(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE ArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void ArmAuthorizationResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.system_id_ = {}; +} +ArmAuthorizationResponse::~ArmAuthorizationResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void ArmAuthorizationResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void ArmAuthorizationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.system_id_ = 0u; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* ArmAuthorizationResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> ArmAuthorizationResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_ArmAuthorizationResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint32 system_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ArmAuthorizationResponse, _impl_.system_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(ArmAuthorizationResponse, _impl_.system_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint32 system_id = 1; + {PROTOBUF_FIELD_OFFSET(ArmAuthorizationResponse, _impl_.system_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt32)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* ArmAuthorizationResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint32 system_id = 1; + if (this->_internal_system_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 1, this->_internal_system_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + return target; +} + +::size_t ArmAuthorizationResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 system_id = 1; + if (this->_internal_system_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this->_internal_system_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData ArmAuthorizationResponse::_class_data_ = { + ArmAuthorizationResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* ArmAuthorizationResponse::GetClassData() const { + return &_class_data_; +} + +void ArmAuthorizationResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_system_id() != 0) { + _this->_internal_set_system_id(from._internal_system_id()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void ArmAuthorizationResponse::CopyFrom(const ArmAuthorizationResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool ArmAuthorizationResponse::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* ArmAuthorizationResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void ArmAuthorizationResponse::InternalSwap(ArmAuthorizationResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.system_id_, other->_impl_.system_id_); +} + +::google::protobuf::Metadata ArmAuthorizationResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[1]); +} +// =================================================================== + +class AcceptArmAuthorizationRequest::_Internal { + public: +}; + +AcceptArmAuthorizationRequest::AcceptArmAuthorizationRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) +} +AcceptArmAuthorizationRequest::AcceptArmAuthorizationRequest( + ::google::protobuf::Arena* arena, const AcceptArmAuthorizationRequest& from) + : AcceptArmAuthorizationRequest(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE AcceptArmAuthorizationRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void AcceptArmAuthorizationRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.valid_time_s_ = {}; +} +AcceptArmAuthorizationRequest::~AcceptArmAuthorizationRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void AcceptArmAuthorizationRequest::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void AcceptArmAuthorizationRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.valid_time_s_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* AcceptArmAuthorizationRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> AcceptArmAuthorizationRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_AcceptArmAuthorizationRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // int32 valid_time_s = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AcceptArmAuthorizationRequest, _impl_.valid_time_s_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationRequest, _impl_.valid_time_s_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // int32 valid_time_s = 1; + {PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationRequest, _impl_.valid_time_s_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* AcceptArmAuthorizationRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // int32 valid_time_s = 1; + if (this->_internal_valid_time_s() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this->_internal_valid_time_s(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + return target; +} + +::size_t AcceptArmAuthorizationRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 valid_time_s = 1; + if (this->_internal_valid_time_s() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this->_internal_valid_time_s()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData AcceptArmAuthorizationRequest::_class_data_ = { + AcceptArmAuthorizationRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* AcceptArmAuthorizationRequest::GetClassData() const { + return &_class_data_; +} + +void AcceptArmAuthorizationRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_valid_time_s() != 0) { + _this->_internal_set_valid_time_s(from._internal_valid_time_s()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void AcceptArmAuthorizationRequest::CopyFrom(const AcceptArmAuthorizationRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool AcceptArmAuthorizationRequest::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* AcceptArmAuthorizationRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void AcceptArmAuthorizationRequest::InternalSwap(AcceptArmAuthorizationRequest* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.valid_time_s_, other->_impl_.valid_time_s_); +} + +::google::protobuf::Metadata AcceptArmAuthorizationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[2]); +} +// =================================================================== + +class AcceptArmAuthorizationResponse::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationResponse, _impl_._has_bits_); + static const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& arm_authorizer_server_result(const AcceptArmAuthorizationResponse* msg); + static void set_has_arm_authorizer_server_result(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& AcceptArmAuthorizationResponse::_Internal::arm_authorizer_server_result(const AcceptArmAuthorizationResponse* msg) { + return *msg->_impl_.arm_authorizer_server_result_; +} +AcceptArmAuthorizationResponse::AcceptArmAuthorizationResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) +} +inline PROTOBUF_NDEBUG_INLINE AcceptArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +AcceptArmAuthorizationResponse::AcceptArmAuthorizationResponse( + ::google::protobuf::Arena* arena, + const AcceptArmAuthorizationResponse& from) + : ::google::protobuf::Message(arena) { + AcceptArmAuthorizationResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.arm_authorizer_server_result_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>(arena, *from._impl_.arm_authorizer_server_result_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) +} +inline PROTOBUF_NDEBUG_INLINE AcceptArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void AcceptArmAuthorizationResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.arm_authorizer_server_result_ = {}; +} +AcceptArmAuthorizationResponse::~AcceptArmAuthorizationResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void AcceptArmAuthorizationResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.arm_authorizer_server_result_; + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void AcceptArmAuthorizationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.arm_authorizer_server_result_ != nullptr); + _impl_.arm_authorizer_server_result_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* AcceptArmAuthorizationResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> AcceptArmAuthorizationResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_AcceptArmAuthorizationResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationResponse, _impl_.arm_authorizer_server_result_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + {PROTOBUF_FIELD_OFFSET(AcceptArmAuthorizationResponse, _impl_.arm_authorizer_server_result_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>()}, + }}, {{ + }}, +}; + +::uint8_t* AcceptArmAuthorizationResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::arm_authorizer_server_result(this), + _Internal::arm_authorizer_server_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + return target; +} + +::size_t AcceptArmAuthorizationResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.arm_authorizer_server_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData AcceptArmAuthorizationResponse::_class_data_ = { + AcceptArmAuthorizationResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* AcceptArmAuthorizationResponse::GetClassData() const { + return &_class_data_; +} + +void AcceptArmAuthorizationResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { + _this->_internal_mutable_arm_authorizer_server_result()->::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult::MergeFrom( + from._internal_arm_authorizer_server_result()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void AcceptArmAuthorizationResponse::CopyFrom(const AcceptArmAuthorizationResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool AcceptArmAuthorizationResponse::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* AcceptArmAuthorizationResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void AcceptArmAuthorizationResponse::InternalSwap(AcceptArmAuthorizationResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.arm_authorizer_server_result_, other->_impl_.arm_authorizer_server_result_); +} + +::google::protobuf::Metadata AcceptArmAuthorizationResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[3]); +} +// =================================================================== + +class RejectArmAuthorizationRequest::_Internal { + public: +}; + +RejectArmAuthorizationRequest::RejectArmAuthorizationRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) +} +RejectArmAuthorizationRequest::RejectArmAuthorizationRequest( + ::google::protobuf::Arena* arena, const RejectArmAuthorizationRequest& from) + : RejectArmAuthorizationRequest(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE RejectArmAuthorizationRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void RejectArmAuthorizationRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, temporarily_), + 0, + offsetof(Impl_, extra_info_) - + offsetof(Impl_, temporarily_) + + sizeof(Impl_::extra_info_)); +} +RejectArmAuthorizationRequest::~RejectArmAuthorizationRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void RejectArmAuthorizationRequest::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void RejectArmAuthorizationRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.temporarily_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.extra_info_) - + reinterpret_cast(&_impl_.temporarily_)) + sizeof(_impl_.extra_info_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RejectArmAuthorizationRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 0, 2> RejectArmAuthorizationRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RejectArmAuthorizationRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // bool temporarily = 1; + {::_pbi::TcParser::SingularVarintNoZag1(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.temporarily_)}}, + // .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RejectArmAuthorizationRequest, _impl_.reason_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.reason_)}}, + // int32 extra_info = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RejectArmAuthorizationRequest, _impl_.extra_info_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.extra_info_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bool temporarily = 1; + {PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.temporarily_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; + {PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.reason_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // int32 extra_info = 3; + {PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.extra_info_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RejectArmAuthorizationRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // bool temporarily = 1; + if (this->_internal_temporarily() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 1, this->_internal_temporarily(), target); + } + + // .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; + if (this->_internal_reason() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_reason(), target); + } + + // int32 extra_info = 3; + if (this->_internal_extra_info() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this->_internal_extra_info(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + return target; +} + +::size_t RejectArmAuthorizationRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool temporarily = 1; + if (this->_internal_temporarily() != 0) { + total_size += 2; + } + + // .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; + if (this->_internal_reason() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_reason()); + } + + // int32 extra_info = 3; + if (this->_internal_extra_info() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this->_internal_extra_info()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData RejectArmAuthorizationRequest::_class_data_ = { + RejectArmAuthorizationRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* RejectArmAuthorizationRequest::GetClassData() const { + return &_class_data_; +} + +void RejectArmAuthorizationRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_temporarily() != 0) { + _this->_internal_set_temporarily(from._internal_temporarily()); + } + if (from._internal_reason() != 0) { + _this->_internal_set_reason(from._internal_reason()); + } + if (from._internal_extra_info() != 0) { + _this->_internal_set_extra_info(from._internal_extra_info()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void RejectArmAuthorizationRequest::CopyFrom(const RejectArmAuthorizationRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool RejectArmAuthorizationRequest::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* RejectArmAuthorizationRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RejectArmAuthorizationRequest::InternalSwap(RejectArmAuthorizationRequest* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.extra_info_) + + sizeof(RejectArmAuthorizationRequest::_impl_.extra_info_) + - PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationRequest, _impl_.temporarily_)>( + reinterpret_cast(&_impl_.temporarily_), + reinterpret_cast(&other->_impl_.temporarily_)); +} + +::google::protobuf::Metadata RejectArmAuthorizationRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[4]); +} +// =================================================================== + +class RejectArmAuthorizationResponse::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationResponse, _impl_._has_bits_); + static const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& arm_authorizer_server_result(const RejectArmAuthorizationResponse* msg); + static void set_has_arm_authorizer_server_result(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& RejectArmAuthorizationResponse::_Internal::arm_authorizer_server_result(const RejectArmAuthorizationResponse* msg) { + return *msg->_impl_.arm_authorizer_server_result_; +} +RejectArmAuthorizationResponse::RejectArmAuthorizationResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) +} +inline PROTOBUF_NDEBUG_INLINE RejectArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +RejectArmAuthorizationResponse::RejectArmAuthorizationResponse( + ::google::protobuf::Arena* arena, + const RejectArmAuthorizationResponse& from) + : ::google::protobuf::Message(arena) { + RejectArmAuthorizationResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.arm_authorizer_server_result_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>(arena, *from._impl_.arm_authorizer_server_result_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) +} +inline PROTOBUF_NDEBUG_INLINE RejectArmAuthorizationResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void RejectArmAuthorizationResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.arm_authorizer_server_result_ = {}; +} +RejectArmAuthorizationResponse::~RejectArmAuthorizationResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void RejectArmAuthorizationResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.arm_authorizer_server_result_; + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void RejectArmAuthorizationResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.arm_authorizer_server_result_ != nullptr); + _impl_.arm_authorizer_server_result_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RejectArmAuthorizationResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> RejectArmAuthorizationResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationResponse, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RejectArmAuthorizationResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationResponse, _impl_.arm_authorizer_server_result_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + {PROTOBUF_FIELD_OFFSET(RejectArmAuthorizationResponse, _impl_.arm_authorizer_server_result_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>()}, + }}, {{ + }}, +}; + +::uint8_t* RejectArmAuthorizationResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::arm_authorizer_server_result(this), + _Internal::arm_authorizer_server_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + return target; +} + +::size_t RejectArmAuthorizationResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.arm_authorizer_server_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData RejectArmAuthorizationResponse::_class_data_ = { + RejectArmAuthorizationResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* RejectArmAuthorizationResponse::GetClassData() const { + return &_class_data_; +} + +void RejectArmAuthorizationResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { + _this->_internal_mutable_arm_authorizer_server_result()->::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult::MergeFrom( + from._internal_arm_authorizer_server_result()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void RejectArmAuthorizationResponse::CopyFrom(const RejectArmAuthorizationResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool RejectArmAuthorizationResponse::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* RejectArmAuthorizationResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RejectArmAuthorizationResponse::InternalSwap(RejectArmAuthorizationResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.arm_authorizer_server_result_, other->_impl_.arm_authorizer_server_result_); +} + +::google::protobuf::Metadata RejectArmAuthorizationResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[5]); +} +// =================================================================== + +class ArmAuthorizerServerResult::_Internal { + public: +}; + +ArmAuthorizerServerResult::ArmAuthorizerServerResult(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) +} +inline PROTOBUF_NDEBUG_INLINE ArmAuthorizerServerResult::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : result_str_(arena, from.result_str_), + _cached_size_{0} {} + +ArmAuthorizerServerResult::ArmAuthorizerServerResult( + ::google::protobuf::Arena* arena, + const ArmAuthorizerServerResult& from) + : ::google::protobuf::Message(arena) { + ArmAuthorizerServerResult* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + _impl_.result_ = from._impl_.result_; + + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) +} +inline PROTOBUF_NDEBUG_INLINE ArmAuthorizerServerResult::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : result_str_(arena), + _cached_size_{0} {} + +inline void ArmAuthorizerServerResult::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.result_ = {}; +} +ArmAuthorizerServerResult::~ArmAuthorizerServerResult() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void ArmAuthorizerServerResult::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.result_str_.Destroy(); + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void ArmAuthorizerServerResult::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.result_str_.ClearToEmpty(); + _impl_.result_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* ArmAuthorizerServerResult::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 77, 2> ArmAuthorizerServerResult::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_ArmAuthorizerServerResult_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string result_str = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(ArmAuthorizerServerResult, _impl_.result_str_)}}, + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ArmAuthorizerServerResult, _impl_.result_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(ArmAuthorizerServerResult, _impl_.result_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; + {PROTOBUF_FIELD_OFFSET(ArmAuthorizerServerResult, _impl_.result_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // string result_str = 2; + {PROTOBUF_FIELD_OFFSET(ArmAuthorizerServerResult, _impl_.result_str_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\72\0\12\0\0\0\0\0" + "mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult" + "result_str" + }}, +}; + +::uint8_t* ArmAuthorizerServerResult::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; + if (this->_internal_result() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_result(), target); + } + + // string result_str = 2; + if (!this->_internal_result_str().empty()) { + const std::string& _s = this->_internal_result_str(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + return target; +} + +::size_t ArmAuthorizerServerResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + ::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 result_str = 2; + if (!this->_internal_result_str().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_result_str()); + } + + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; + if (this->_internal_result() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_result()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData ArmAuthorizerServerResult::_class_data_ = { + ArmAuthorizerServerResult::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor +}; +const ::google::protobuf::Message::ClassData* ArmAuthorizerServerResult::GetClassData() const { + return &_class_data_; +} + +void ArmAuthorizerServerResult::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_result_str().empty()) { + _this->_internal_set_result_str(from._internal_result_str()); + } + if (from._internal_result() != 0) { + _this->_internal_set_result(from._internal_result()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void ArmAuthorizerServerResult::CopyFrom(const ArmAuthorizerServerResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool ArmAuthorizerServerResult::IsInitialized() const { + return true; +} + +::_pbi::CachedSize* ArmAuthorizerServerResult::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void ArmAuthorizerServerResult::InternalSwap(ArmAuthorizerServerResult* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.result_str_, &other->_impl_.result_str_, arena); + swap(_impl_.result_, other->_impl_.result_); +} + +::google::protobuf::Metadata ArmAuthorizerServerResult::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_getter, &descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_once, + file_level_metadata_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto[6]); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace arm_authorizer_server +} // namespace rpc +} // namespace mavsdk +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +#include "google/protobuf/port_undef.inc" diff --git a/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.h b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.h new file mode 100644 index 0000000000..56ccb4f480 --- /dev/null +++ b/src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.h @@ -0,0 +1,1890 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: arm_authorizer_server/arm_authorizer_server.proto +// Protobuf C++ Version: 4.25.1 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#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 // PROTOBUF_VERSION + +#if 4025001 < 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 // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_bases.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +#include "mavsdk_options.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { +class AcceptArmAuthorizationRequest; +struct AcceptArmAuthorizationRequestDefaultTypeInternal; +extern AcceptArmAuthorizationRequestDefaultTypeInternal _AcceptArmAuthorizationRequest_default_instance_; +class AcceptArmAuthorizationResponse; +struct AcceptArmAuthorizationResponseDefaultTypeInternal; +extern AcceptArmAuthorizationResponseDefaultTypeInternal _AcceptArmAuthorizationResponse_default_instance_; +class ArmAuthorizationResponse; +struct ArmAuthorizationResponseDefaultTypeInternal; +extern ArmAuthorizationResponseDefaultTypeInternal _ArmAuthorizationResponse_default_instance_; +class ArmAuthorizerServerResult; +struct ArmAuthorizerServerResultDefaultTypeInternal; +extern ArmAuthorizerServerResultDefaultTypeInternal _ArmAuthorizerServerResult_default_instance_; +class RejectArmAuthorizationRequest; +struct RejectArmAuthorizationRequestDefaultTypeInternal; +extern RejectArmAuthorizationRequestDefaultTypeInternal _RejectArmAuthorizationRequest_default_instance_; +class RejectArmAuthorizationResponse; +struct RejectArmAuthorizationResponseDefaultTypeInternal; +extern RejectArmAuthorizationResponseDefaultTypeInternal _RejectArmAuthorizationResponse_default_instance_; +class SubscribeArmAuthorizationRequest; +struct SubscribeArmAuthorizationRequestDefaultTypeInternal; +extern SubscribeArmAuthorizationRequestDefaultTypeInternal _SubscribeArmAuthorizationRequest_default_instance_; +} // namespace arm_authorizer_server +} // namespace rpc +} // namespace mavsdk +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace mavsdk { +namespace rpc { +namespace arm_authorizer_server { +enum ArmAuthorizerServerResult_Result : int { + ArmAuthorizerServerResult_Result_RESULT_UNKNOWN = 0, + ArmAuthorizerServerResult_Result_RESULT_SUCCESS = 1, + ArmAuthorizerServerResult_Result_RESULT_FAILED = 2, + ArmAuthorizerServerResult_Result_ArmAuthorizerServerResult_Result_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + ArmAuthorizerServerResult_Result_ArmAuthorizerServerResult_Result_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool ArmAuthorizerServerResult_Result_IsValid(int value); +extern const uint32_t ArmAuthorizerServerResult_Result_internal_data_[]; +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult_Result_Result_MIN = static_cast(0); +constexpr ArmAuthorizerServerResult_Result ArmAuthorizerServerResult_Result_Result_MAX = static_cast(2); +constexpr int ArmAuthorizerServerResult_Result_Result_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +ArmAuthorizerServerResult_Result_descriptor(); +template +const std::string& ArmAuthorizerServerResult_Result_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Result_Name()."); + return ArmAuthorizerServerResult_Result_Name(static_cast(value)); +} +template <> +inline const std::string& ArmAuthorizerServerResult_Result_Name(ArmAuthorizerServerResult_Result value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool ArmAuthorizerServerResult_Result_Parse(absl::string_view name, ArmAuthorizerServerResult_Result* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ArmAuthorizerServerResult_Result_descriptor(), name, value); +} +enum RejectionReason : int { + REJECTION_REASON_GENERIC = 0, + REJECTION_REASON_NONE = 1, + REJECTION_REASON_INVALID_WAYPOINT = 2, + REJECTION_REASON_TIMEOUT = 3, + REJECTION_REASON_AIRSPACE_IN_USE = 4, + REJECTION_REASON_BAD_WEATHER = 5, + RejectionReason_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + RejectionReason_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool RejectionReason_IsValid(int value); +extern const uint32_t RejectionReason_internal_data_[]; +constexpr RejectionReason RejectionReason_MIN = static_cast(0); +constexpr RejectionReason RejectionReason_MAX = static_cast(5); +constexpr int RejectionReason_ARRAYSIZE = 5 + 1; +const ::google::protobuf::EnumDescriptor* +RejectionReason_descriptor(); +template +const std::string& RejectionReason_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to RejectionReason_Name()."); + return RejectionReason_Name(static_cast(value)); +} +template <> +inline const std::string& RejectionReason_Name(RejectionReason value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool RejectionReason_Parse(absl::string_view name, RejectionReason* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RejectionReason_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class SubscribeArmAuthorizationRequest final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.SubscribeArmAuthorizationRequest) */ { + public: + inline SubscribeArmAuthorizationRequest() : SubscribeArmAuthorizationRequest(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR SubscribeArmAuthorizationRequest(::google::protobuf::internal::ConstantInitialized); + + inline SubscribeArmAuthorizationRequest(const SubscribeArmAuthorizationRequest& from) + : SubscribeArmAuthorizationRequest(nullptr, from) {} + SubscribeArmAuthorizationRequest(SubscribeArmAuthorizationRequest&& from) noexcept + : SubscribeArmAuthorizationRequest() { + *this = ::std::move(from); + } + + inline SubscribeArmAuthorizationRequest& operator=(const SubscribeArmAuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline SubscribeArmAuthorizationRequest& operator=(SubscribeArmAuthorizationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SubscribeArmAuthorizationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SubscribeArmAuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_SubscribeArmAuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SubscribeArmAuthorizationRequest& a, SubscribeArmAuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(SubscribeArmAuthorizationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SubscribeArmAuthorizationRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SubscribeArmAuthorizationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const SubscribeArmAuthorizationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const SubscribeArmAuthorizationRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.SubscribeArmAuthorizationRequest"; + } + protected: + explicit SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena); + SubscribeArmAuthorizationRequest(::google::protobuf::Arena* arena, const SubscribeArmAuthorizationRequest& from); + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.SubscribeArmAuthorizationRequest) + private: + class _Internal; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class RejectArmAuthorizationRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) */ { + public: + inline RejectArmAuthorizationRequest() : RejectArmAuthorizationRequest(nullptr) {} + ~RejectArmAuthorizationRequest() override; + template + explicit PROTOBUF_CONSTEXPR RejectArmAuthorizationRequest(::google::protobuf::internal::ConstantInitialized); + + inline RejectArmAuthorizationRequest(const RejectArmAuthorizationRequest& from) + : RejectArmAuthorizationRequest(nullptr, from) {} + RejectArmAuthorizationRequest(RejectArmAuthorizationRequest&& from) noexcept + : RejectArmAuthorizationRequest() { + *this = ::std::move(from); + } + + inline RejectArmAuthorizationRequest& operator=(const RejectArmAuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline RejectArmAuthorizationRequest& operator=(RejectArmAuthorizationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RejectArmAuthorizationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RejectArmAuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_RejectArmAuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RejectArmAuthorizationRequest& a, RejectArmAuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(RejectArmAuthorizationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RejectArmAuthorizationRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RejectArmAuthorizationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RejectArmAuthorizationRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RejectArmAuthorizationRequest& from) { + RejectArmAuthorizationRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(RejectArmAuthorizationRequest* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest"; + } + protected: + explicit RejectArmAuthorizationRequest(::google::protobuf::Arena* arena); + RejectArmAuthorizationRequest(::google::protobuf::Arena* arena, const RejectArmAuthorizationRequest& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTemporarilyFieldNumber = 1, + kReasonFieldNumber = 2, + kExtraInfoFieldNumber = 3, + }; + // bool temporarily = 1; + void clear_temporarily() ; + bool temporarily() const; + void set_temporarily(bool value); + + private: + bool _internal_temporarily() const; + void _internal_set_temporarily(bool value); + + public: + // .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; + void clear_reason() ; + ::mavsdk::rpc::arm_authorizer_server::RejectionReason reason() const; + void set_reason(::mavsdk::rpc::arm_authorizer_server::RejectionReason value); + + private: + ::mavsdk::rpc::arm_authorizer_server::RejectionReason _internal_reason() const; + void _internal_set_reason(::mavsdk::rpc::arm_authorizer_server::RejectionReason value); + + public: + // int32 extra_info = 3; + void clear_extra_info() ; + ::int32_t extra_info() const; + void set_extra_info(::int32_t value); + + private: + ::int32_t _internal_extra_info() const; + void _internal_set_extra_info(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + bool temporarily_; + int reason_; + ::int32_t extra_info_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class ArmAuthorizerServerResult final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) */ { + public: + inline ArmAuthorizerServerResult() : ArmAuthorizerServerResult(nullptr) {} + ~ArmAuthorizerServerResult() override; + template + explicit PROTOBUF_CONSTEXPR ArmAuthorizerServerResult(::google::protobuf::internal::ConstantInitialized); + + inline ArmAuthorizerServerResult(const ArmAuthorizerServerResult& from) + : ArmAuthorizerServerResult(nullptr, from) {} + ArmAuthorizerServerResult(ArmAuthorizerServerResult&& from) noexcept + : ArmAuthorizerServerResult() { + *this = ::std::move(from); + } + + inline ArmAuthorizerServerResult& operator=(const ArmAuthorizerServerResult& from) { + CopyFrom(from); + return *this; + } + inline ArmAuthorizerServerResult& operator=(ArmAuthorizerServerResult&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ArmAuthorizerServerResult& default_instance() { + return *internal_default_instance(); + } + static inline const ArmAuthorizerServerResult* internal_default_instance() { + return reinterpret_cast( + &_ArmAuthorizerServerResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(ArmAuthorizerServerResult& a, ArmAuthorizerServerResult& b) { + a.Swap(&b); + } + inline void Swap(ArmAuthorizerServerResult* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ArmAuthorizerServerResult* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArmAuthorizerServerResult* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ArmAuthorizerServerResult& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ArmAuthorizerServerResult& from) { + ArmAuthorizerServerResult::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(ArmAuthorizerServerResult* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult"; + } + protected: + explicit ArmAuthorizerServerResult(::google::protobuf::Arena* arena); + ArmAuthorizerServerResult(::google::protobuf::Arena* arena, const ArmAuthorizerServerResult& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + using Result = ArmAuthorizerServerResult_Result; + static constexpr Result RESULT_UNKNOWN = ArmAuthorizerServerResult_Result_RESULT_UNKNOWN; + static constexpr Result RESULT_SUCCESS = ArmAuthorizerServerResult_Result_RESULT_SUCCESS; + static constexpr Result RESULT_FAILED = ArmAuthorizerServerResult_Result_RESULT_FAILED; + static inline bool Result_IsValid(int value) { + return ArmAuthorizerServerResult_Result_IsValid(value); + } + static constexpr Result Result_MIN = ArmAuthorizerServerResult_Result_Result_MIN; + static constexpr Result Result_MAX = ArmAuthorizerServerResult_Result_Result_MAX; + static constexpr int Result_ARRAYSIZE = ArmAuthorizerServerResult_Result_Result_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* Result_descriptor() { + return ArmAuthorizerServerResult_Result_descriptor(); + } + template + static inline const std::string& Result_Name(T value) { + return ArmAuthorizerServerResult_Result_Name(value); + } + static inline bool Result_Parse(absl::string_view name, Result* value) { + return ArmAuthorizerServerResult_Result_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kResultStrFieldNumber = 2, + kResultFieldNumber = 1, + }; + // string result_str = 2; + void clear_result_str() ; + const std::string& result_str() const; + template + void set_result_str(Arg_&& arg, Args_... args); + std::string* mutable_result_str(); + PROTOBUF_NODISCARD std::string* release_result_str(); + void set_allocated_result_str(std::string* value); + + private: + const std::string& _internal_result_str() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_result_str( + const std::string& value); + std::string* _internal_mutable_result_str(); + + public: + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; + void clear_result() ; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result result() const; + void set_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result value); + + private: + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result _internal_result() const; + void _internal_set_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 77, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr result_str_; + int result_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class ArmAuthorizationResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) */ { + public: + inline ArmAuthorizationResponse() : ArmAuthorizationResponse(nullptr) {} + ~ArmAuthorizationResponse() override; + template + explicit PROTOBUF_CONSTEXPR ArmAuthorizationResponse(::google::protobuf::internal::ConstantInitialized); + + inline ArmAuthorizationResponse(const ArmAuthorizationResponse& from) + : ArmAuthorizationResponse(nullptr, from) {} + ArmAuthorizationResponse(ArmAuthorizationResponse&& from) noexcept + : ArmAuthorizationResponse() { + *this = ::std::move(from); + } + + inline ArmAuthorizationResponse& operator=(const ArmAuthorizationResponse& from) { + CopyFrom(from); + return *this; + } + inline ArmAuthorizationResponse& operator=(ArmAuthorizationResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ArmAuthorizationResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ArmAuthorizationResponse* internal_default_instance() { + return reinterpret_cast( + &_ArmAuthorizationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ArmAuthorizationResponse& a, ArmAuthorizationResponse& b) { + a.Swap(&b); + } + inline void Swap(ArmAuthorizationResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ArmAuthorizationResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArmAuthorizationResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ArmAuthorizationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ArmAuthorizationResponse& from) { + ArmAuthorizationResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(ArmAuthorizationResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse"; + } + protected: + explicit ArmAuthorizationResponse(::google::protobuf::Arena* arena); + ArmAuthorizationResponse(::google::protobuf::Arena* arena, const ArmAuthorizationResponse& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSystemIdFieldNumber = 1, + }; + // uint32 system_id = 1; + void clear_system_id() ; + ::uint32_t system_id() const; + void set_system_id(::uint32_t value); + + private: + ::uint32_t _internal_system_id() const; + void _internal_set_system_id(::uint32_t value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint32_t system_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class AcceptArmAuthorizationRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) */ { + public: + inline AcceptArmAuthorizationRequest() : AcceptArmAuthorizationRequest(nullptr) {} + ~AcceptArmAuthorizationRequest() override; + template + explicit PROTOBUF_CONSTEXPR AcceptArmAuthorizationRequest(::google::protobuf::internal::ConstantInitialized); + + inline AcceptArmAuthorizationRequest(const AcceptArmAuthorizationRequest& from) + : AcceptArmAuthorizationRequest(nullptr, from) {} + AcceptArmAuthorizationRequest(AcceptArmAuthorizationRequest&& from) noexcept + : AcceptArmAuthorizationRequest() { + *this = ::std::move(from); + } + + inline AcceptArmAuthorizationRequest& operator=(const AcceptArmAuthorizationRequest& from) { + CopyFrom(from); + return *this; + } + inline AcceptArmAuthorizationRequest& operator=(AcceptArmAuthorizationRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AcceptArmAuthorizationRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AcceptArmAuthorizationRequest* internal_default_instance() { + return reinterpret_cast( + &_AcceptArmAuthorizationRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(AcceptArmAuthorizationRequest& a, AcceptArmAuthorizationRequest& b) { + a.Swap(&b); + } + inline void Swap(AcceptArmAuthorizationRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AcceptArmAuthorizationRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AcceptArmAuthorizationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const AcceptArmAuthorizationRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const AcceptArmAuthorizationRequest& from) { + AcceptArmAuthorizationRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(AcceptArmAuthorizationRequest* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest"; + } + protected: + explicit AcceptArmAuthorizationRequest(::google::protobuf::Arena* arena); + AcceptArmAuthorizationRequest(::google::protobuf::Arena* arena, const AcceptArmAuthorizationRequest& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValidTimeSFieldNumber = 1, + }; + // int32 valid_time_s = 1; + void clear_valid_time_s() ; + ::int32_t valid_time_s() const; + void set_valid_time_s(::int32_t value); + + private: + ::int32_t _internal_valid_time_s() const; + void _internal_set_valid_time_s(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::int32_t valid_time_s_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class RejectArmAuthorizationResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) */ { + public: + inline RejectArmAuthorizationResponse() : RejectArmAuthorizationResponse(nullptr) {} + ~RejectArmAuthorizationResponse() override; + template + explicit PROTOBUF_CONSTEXPR RejectArmAuthorizationResponse(::google::protobuf::internal::ConstantInitialized); + + inline RejectArmAuthorizationResponse(const RejectArmAuthorizationResponse& from) + : RejectArmAuthorizationResponse(nullptr, from) {} + RejectArmAuthorizationResponse(RejectArmAuthorizationResponse&& from) noexcept + : RejectArmAuthorizationResponse() { + *this = ::std::move(from); + } + + inline RejectArmAuthorizationResponse& operator=(const RejectArmAuthorizationResponse& from) { + CopyFrom(from); + return *this; + } + inline RejectArmAuthorizationResponse& operator=(RejectArmAuthorizationResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RejectArmAuthorizationResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RejectArmAuthorizationResponse* internal_default_instance() { + return reinterpret_cast( + &_RejectArmAuthorizationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(RejectArmAuthorizationResponse& a, RejectArmAuthorizationResponse& b) { + a.Swap(&b); + } + inline void Swap(RejectArmAuthorizationResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RejectArmAuthorizationResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RejectArmAuthorizationResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RejectArmAuthorizationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RejectArmAuthorizationResponse& from) { + RejectArmAuthorizationResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(RejectArmAuthorizationResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse"; + } + protected: + explicit RejectArmAuthorizationResponse(::google::protobuf::Arena* arena); + RejectArmAuthorizationResponse(::google::protobuf::Arena* arena, const RejectArmAuthorizationResponse& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArmAuthorizerServerResultFieldNumber = 1, + }; + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + bool has_arm_authorizer_server_result() const; + void clear_arm_authorizer_server_result() ; + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& arm_authorizer_server_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* release_arm_authorizer_server_result(); + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* mutable_arm_authorizer_server_result(); + void set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value); + void unsafe_arena_set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value); + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* unsafe_arena_release_arm_authorizer_server_result(); + + private: + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& _internal_arm_authorizer_server_result() const; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* _internal_mutable_arm_authorizer_server_result(); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* arm_authorizer_server_result_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +};// ------------------------------------------------------------------- + +class AcceptArmAuthorizationResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) */ { + public: + inline AcceptArmAuthorizationResponse() : AcceptArmAuthorizationResponse(nullptr) {} + ~AcceptArmAuthorizationResponse() override; + template + explicit PROTOBUF_CONSTEXPR AcceptArmAuthorizationResponse(::google::protobuf::internal::ConstantInitialized); + + inline AcceptArmAuthorizationResponse(const AcceptArmAuthorizationResponse& from) + : AcceptArmAuthorizationResponse(nullptr, from) {} + AcceptArmAuthorizationResponse(AcceptArmAuthorizationResponse&& from) noexcept + : AcceptArmAuthorizationResponse() { + *this = ::std::move(from); + } + + inline AcceptArmAuthorizationResponse& operator=(const AcceptArmAuthorizationResponse& from) { + CopyFrom(from); + return *this; + } + inline AcceptArmAuthorizationResponse& operator=(AcceptArmAuthorizationResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AcceptArmAuthorizationResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AcceptArmAuthorizationResponse* internal_default_instance() { + return reinterpret_cast( + &_AcceptArmAuthorizationResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(AcceptArmAuthorizationResponse& a, AcceptArmAuthorizationResponse& b) { + a.Swap(&b); + } + inline void Swap(AcceptArmAuthorizationResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AcceptArmAuthorizationResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AcceptArmAuthorizationResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const AcceptArmAuthorizationResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const AcceptArmAuthorizationResponse& from) { + AcceptArmAuthorizationResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::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, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(AcceptArmAuthorizationResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse"; + } + protected: + explicit AcceptArmAuthorizationResponse(::google::protobuf::Arena* arena); + AcceptArmAuthorizationResponse(::google::protobuf::Arena* arena, const AcceptArmAuthorizationResponse& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArmAuthorizerServerResultFieldNumber = 1, + }; + // .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; + bool has_arm_authorizer_server_result() const; + void clear_arm_authorizer_server_result() ; + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& arm_authorizer_server_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* release_arm_authorizer_server_result(); + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* mutable_arm_authorizer_server_result(); + void set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value); + void unsafe_arena_set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value); + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* unsafe_arena_release_arm_authorizer_server_result(); + + private: + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& _internal_arm_authorizer_server_result() const; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* _internal_mutable_arm_authorizer_server_result(); + + public: + // @@protoc_insertion_point(class_scope:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* arm_authorizer_server_result_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// SubscribeArmAuthorizationRequest + +// ------------------------------------------------------------------- + +// ArmAuthorizationResponse + +// uint32 system_id = 1; +inline void ArmAuthorizationResponse::clear_system_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.system_id_ = 0u; +} +inline ::uint32_t ArmAuthorizationResponse::system_id() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse.system_id) + return _internal_system_id(); +} +inline void ArmAuthorizationResponse::set_system_id(::uint32_t value) { + _internal_set_system_id(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.ArmAuthorizationResponse.system_id) +} +inline ::uint32_t ArmAuthorizationResponse::_internal_system_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.system_id_; +} +inline void ArmAuthorizationResponse::_internal_set_system_id(::uint32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.system_id_ = value; +} + +// ------------------------------------------------------------------- + +// AcceptArmAuthorizationRequest + +// int32 valid_time_s = 1; +inline void AcceptArmAuthorizationRequest::clear_valid_time_s() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.valid_time_s_ = 0; +} +inline ::int32_t AcceptArmAuthorizationRequest::valid_time_s() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest.valid_time_s) + return _internal_valid_time_s(); +} +inline void AcceptArmAuthorizationRequest::set_valid_time_s(::int32_t value) { + _internal_set_valid_time_s(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationRequest.valid_time_s) +} +inline ::int32_t AcceptArmAuthorizationRequest::_internal_valid_time_s() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.valid_time_s_; +} +inline void AcceptArmAuthorizationRequest::_internal_set_valid_time_s(::int32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.valid_time_s_ = value; +} + +// ------------------------------------------------------------------- + +// AcceptArmAuthorizationResponse + +// .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; +inline bool AcceptArmAuthorizationResponse::has_arm_authorizer_server_result() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.arm_authorizer_server_result_ != nullptr); + return value; +} +inline void AcceptArmAuthorizationResponse::clear_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.arm_authorizer_server_result_ != nullptr) _impl_.arm_authorizer_server_result_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& AcceptArmAuthorizationResponse::_internal_arm_authorizer_server_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* p = _impl_.arm_authorizer_server_result_; + return p != nullptr ? *p : reinterpret_cast(::mavsdk::rpc::arm_authorizer_server::_ArmAuthorizerServerResult_default_instance_); +} +inline const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& AcceptArmAuthorizationResponse::arm_authorizer_server_result() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse.arm_authorizer_server_result) + return _internal_arm_authorizer_server_result(); +} +inline void AcceptArmAuthorizationResponse::unsafe_arena_set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.arm_authorizer_server_result_); + } + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse.arm_authorizer_server_result) +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* AcceptArmAuthorizationResponse::release_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* released = _impl_.arm_authorizer_server_result_; + _impl_.arm_authorizer_server_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* AcceptArmAuthorizationResponse::unsafe_arena_release_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse.arm_authorizer_server_result) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* temp = _impl_.arm_authorizer_server_result_; + _impl_.arm_authorizer_server_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* AcceptArmAuthorizationResponse::_internal_mutable_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.arm_authorizer_server_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>(GetArena()); + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(p); + } + return _impl_.arm_authorizer_server_result_; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* AcceptArmAuthorizationResponse::mutable_arm_authorizer_server_result() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* _msg = _internal_mutable_arm_authorizer_server_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse.arm_authorizer_server_result) + return _msg; +} +inline void AcceptArmAuthorizationResponse::set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(_impl_.arm_authorizer_server_result_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value); + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.arm_authorizer_server.AcceptArmAuthorizationResponse.arm_authorizer_server_result) +} + +// ------------------------------------------------------------------- + +// RejectArmAuthorizationRequest + +// bool temporarily = 1; +inline void RejectArmAuthorizationRequest::clear_temporarily() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.temporarily_ = false; +} +inline bool RejectArmAuthorizationRequest::temporarily() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.temporarily) + return _internal_temporarily(); +} +inline void RejectArmAuthorizationRequest::set_temporarily(bool value) { + _internal_set_temporarily(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.temporarily) +} +inline bool RejectArmAuthorizationRequest::_internal_temporarily() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.temporarily_; +} +inline void RejectArmAuthorizationRequest::_internal_set_temporarily(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.temporarily_ = value; +} + +// .mavsdk.rpc.arm_authorizer_server.RejectionReason reason = 2; +inline void RejectArmAuthorizationRequest::clear_reason() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.reason_ = 0; +} +inline ::mavsdk::rpc::arm_authorizer_server::RejectionReason RejectArmAuthorizationRequest::reason() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.reason) + return _internal_reason(); +} +inline void RejectArmAuthorizationRequest::set_reason(::mavsdk::rpc::arm_authorizer_server::RejectionReason value) { + _internal_set_reason(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.reason) +} +inline ::mavsdk::rpc::arm_authorizer_server::RejectionReason RejectArmAuthorizationRequest::_internal_reason() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::mavsdk::rpc::arm_authorizer_server::RejectionReason>(_impl_.reason_); +} +inline void RejectArmAuthorizationRequest::_internal_set_reason(::mavsdk::rpc::arm_authorizer_server::RejectionReason value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.reason_ = value; +} + +// int32 extra_info = 3; +inline void RejectArmAuthorizationRequest::clear_extra_info() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.extra_info_ = 0; +} +inline ::int32_t RejectArmAuthorizationRequest::extra_info() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.extra_info) + return _internal_extra_info(); +} +inline void RejectArmAuthorizationRequest::set_extra_info(::int32_t value) { + _internal_set_extra_info(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationRequest.extra_info) +} +inline ::int32_t RejectArmAuthorizationRequest::_internal_extra_info() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.extra_info_; +} +inline void RejectArmAuthorizationRequest::_internal_set_extra_info(::int32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.extra_info_ = value; +} + +// ------------------------------------------------------------------- + +// RejectArmAuthorizationResponse + +// .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult arm_authorizer_server_result = 1; +inline bool RejectArmAuthorizationResponse::has_arm_authorizer_server_result() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.arm_authorizer_server_result_ != nullptr); + return value; +} +inline void RejectArmAuthorizationResponse::clear_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.arm_authorizer_server_result_ != nullptr) _impl_.arm_authorizer_server_result_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& RejectArmAuthorizationResponse::_internal_arm_authorizer_server_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* p = _impl_.arm_authorizer_server_result_; + return p != nullptr ? *p : reinterpret_cast(::mavsdk::rpc::arm_authorizer_server::_ArmAuthorizerServerResult_default_instance_); +} +inline const ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult& RejectArmAuthorizationResponse::arm_authorizer_server_result() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse.arm_authorizer_server_result) + return _internal_arm_authorizer_server_result(); +} +inline void RejectArmAuthorizationResponse::unsafe_arena_set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.arm_authorizer_server_result_); + } + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse.arm_authorizer_server_result) +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* RejectArmAuthorizationResponse::release_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* released = _impl_.arm_authorizer_server_result_; + _impl_.arm_authorizer_server_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* RejectArmAuthorizationResponse::unsafe_arena_release_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse.arm_authorizer_server_result) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* temp = _impl_.arm_authorizer_server_result_; + _impl_.arm_authorizer_server_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* RejectArmAuthorizationResponse::_internal_mutable_arm_authorizer_server_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.arm_authorizer_server_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult>(GetArena()); + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(p); + } + return _impl_.arm_authorizer_server_result_; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* RejectArmAuthorizationResponse::mutable_arm_authorizer_server_result() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* _msg = _internal_mutable_arm_authorizer_server_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse.arm_authorizer_server_result) + return _msg; +} +inline void RejectArmAuthorizationResponse::set_allocated_arm_authorizer_server_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(_impl_.arm_authorizer_server_result_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.arm_authorizer_server_result_ = reinterpret_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult*>(value); + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.arm_authorizer_server.RejectArmAuthorizationResponse.arm_authorizer_server_result) +} + +// ------------------------------------------------------------------- + +// ArmAuthorizerServerResult + +// .mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.Result result = 1; +inline void ArmAuthorizerServerResult::clear_result() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.result_ = 0; +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result) + return _internal_result(); +} +inline void ArmAuthorizerServerResult::set_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result value) { + _internal_set_result(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result) +} +inline ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result ArmAuthorizerServerResult::_internal_result() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result>(_impl_.result_); +} +inline void ArmAuthorizerServerResult::_internal_set_result(::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.result_ = value; +} + +// string result_str = 2; +inline void ArmAuthorizerServerResult::clear_result_str() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.result_str_.ClearToEmpty(); +} +inline const std::string& ArmAuthorizerServerResult::result_str() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str) + return _internal_result_str(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ArmAuthorizerServerResult::set_result_str(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.result_str_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str) +} +inline std::string* ArmAuthorizerServerResult::mutable_result_str() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_result_str(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str) + return _s; +} +inline const std::string& ArmAuthorizerServerResult::_internal_result_str() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.result_str_.Get(); +} +inline void ArmAuthorizerServerResult::_internal_set_result_str(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.result_str_.Set(value, GetArena()); +} +inline std::string* ArmAuthorizerServerResult::_internal_mutable_result_str() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.result_str_.Mutable( GetArena()); +} +inline std::string* ArmAuthorizerServerResult::release_result_str() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str) + return _impl_.result_str_.Release(); +} +inline void ArmAuthorizerServerResult::set_allocated_result_str(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.result_str_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.result_str_.IsDefault()) { + _impl_.result_str_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerResult.result_str) +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace arm_authorizer_server +} // namespace rpc +} // namespace mavsdk + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result>() { + return ::mavsdk::rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_descriptor(); +} +template <> +struct is_proto_enum<::mavsdk::rpc::arm_authorizer_server::RejectionReason> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::mavsdk::rpc::arm_authorizer_server::RejectionReason>() { + return ::mavsdk::rpc::arm_authorizer_server::RejectionReason_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_arm_5fauthorizer_5fserver_2farm_5fauthorizer_5fserver_2eproto_2epb_2eh diff --git a/src/mavsdk_server/src/grpc_server.cpp b/src/mavsdk_server/src/grpc_server.cpp index 43c971a1ef..f7aa97999c 100644 --- a/src/mavsdk_server/src/grpc_server.cpp +++ b/src/mavsdk_server/src/grpc_server.cpp @@ -30,6 +30,10 @@ int GrpcServer::run() builder.RegisterService(&_action_server_service); #endif +#ifdef ARM_AUTHORIZER_SERVER_ENABLED + builder.RegisterService(&_arm_authorizer_server_service); +#endif + #ifdef CALIBRATION_ENABLED builder.RegisterService(&_calibration_service); #endif @@ -189,6 +193,10 @@ void GrpcServer::stop() _action_server_service.stop(); #endif +#ifdef ARM_AUTHORIZER_SERVER_ENABLED + _arm_authorizer_server_service.stop(); +#endif + #ifdef CALIBRATION_ENABLED _calibration_service.stop(); #endif diff --git a/src/mavsdk_server/src/grpc_server.h b/src/mavsdk_server/src/grpc_server.h index 439af39733..47032aa171 100644 --- a/src/mavsdk_server/src/grpc_server.h +++ b/src/mavsdk_server/src/grpc_server.h @@ -24,6 +24,11 @@ #include "action_server/action_server_service_impl.h" #endif +#ifdef ARM_AUTHORIZER_SERVER_ENABLED +#include "plugins/arm_authorizer_server/arm_authorizer_server.h" +#include "arm_authorizer_server/arm_authorizer_server_service_impl.h" +#endif + #ifdef CALIBRATION_ENABLED #include "plugins/calibration/calibration.h" #include "calibration/calibration_service_impl.h" @@ -192,6 +197,11 @@ class GrpcServer { _action_server_service(_action_server_lazy_plugin), #endif +#ifdef ARM_AUTHORIZER_SERVER_ENABLED + _arm_authorizer_server_lazy_plugin(mavsdk), + _arm_authorizer_server_service(_arm_authorizer_server_lazy_plugin), +#endif + #ifdef CALIBRATION_ENABLED _calibration_lazy_plugin(mavsdk), _calibration_service(_calibration_lazy_plugin), @@ -368,6 +378,13 @@ class GrpcServer { ActionServerServiceImpl<> _action_server_service; #endif +#ifdef ARM_AUTHORIZER_SERVER_ENABLED + + LazyServerPlugin _arm_authorizer_server_lazy_plugin; + + ArmAuthorizerServerServiceImpl<> _arm_authorizer_server_service; +#endif + #ifdef CALIBRATION_ENABLED LazyPlugin _calibration_lazy_plugin; diff --git a/src/mavsdk_server/src/plugins/arm_authorizer/arm_authorizer_service_impl.h b/src/mavsdk_server/src/plugins/arm_authorizer/arm_authorizer_service_impl.h new file mode 100644 index 0000000000..9fba3b4c48 --- /dev/null +++ b/src/mavsdk_server/src/plugins/arm_authorizer/arm_authorizer_service_impl.h @@ -0,0 +1,202 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see +// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/arm_authorizer/arm_authorizer.proto) + +#include "arm_authorizer/arm_authorizer.grpc.pb.h" +#include "plugins/arm_authorizer/arm_authorizer.h" + +#include "mavsdk.h" + +#include "lazy_plugin.h" + +#include "log.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace mavsdk_server { + +template> + +class ArmAuthorizerServiceImpl final : public rpc::arm_authorizer::ArmAuthorizerService::Service { +public: + ArmAuthorizerServiceImpl(LazyPlugin& lazy_plugin) : _lazy_plugin(lazy_plugin) {} + + static rpc::arm_authorizer::ArmAuthorizerDecision translateToRpcArmAuthorizerDecision( + const mavsdk::ArmAuthorizer::ArmAuthorizerDecision& arm_authorizer_decision) + { + switch (arm_authorizer_decision) { + default: + LogErr() << "Unknown arm_authorizer_decision enum value: " + << static_cast(arm_authorizer_decision); + // FALLTHROUGH + case mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionAccepted: + return rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_ACCEPTED; + case mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionTemporarilyRejected: + return rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_TEMPORARILY_REJECTED; + case mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionDenied: + return rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_DENIED; + } + } + + static mavsdk::ArmAuthorizer::ArmAuthorizerDecision translateFromRpcArmAuthorizerDecision( + const rpc::arm_authorizer::ArmAuthorizerDecision arm_authorizer_decision) + { + switch (arm_authorizer_decision) { + default: + LogErr() << "Unknown arm_authorizer_decision enum value: " + << static_cast(arm_authorizer_decision); + // FALLTHROUGH + case rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_ACCEPTED: + return mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionAccepted; + case rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_TEMPORARILY_REJECTED: + return mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionTemporarilyRejected; + case rpc::arm_authorizer::ARM_AUTHORIZER_DECISION_DECISION_DENIED: + return mavsdk::ArmAuthorizer::ArmAuthorizerDecision::DecisionDenied; + } + } + + static rpc::arm_authorizer::CommandAnswer + translateToRpcCommandAnswer(const mavsdk::ArmAuthorizer::CommandAnswer& command_answer) + { + switch (command_answer) { + default: + LogErr() << "Unknown command_answer enum value: " + << static_cast(command_answer); + // FALLTHROUGH + case mavsdk::ArmAuthorizer::CommandAnswer::Accepted: + return rpc::arm_authorizer::COMMAND_ANSWER_ACCEPTED; + case mavsdk::ArmAuthorizer::CommandAnswer::Failed: + return rpc::arm_authorizer::COMMAND_ANSWER_FAILED; + } + } + + static mavsdk::ArmAuthorizer::CommandAnswer + translateFromRpcCommandAnswer(const rpc::arm_authorizer::CommandAnswer command_answer) + { + switch (command_answer) { + default: + LogErr() << "Unknown command_answer enum value: " + << static_cast(command_answer); + // FALLTHROUGH + case rpc::arm_authorizer::COMMAND_ANSWER_ACCEPTED: + return mavsdk::ArmAuthorizer::CommandAnswer::Accepted; + case rpc::arm_authorizer::COMMAND_ANSWER_FAILED: + return mavsdk::ArmAuthorizer::CommandAnswer::Failed; + } + } + + grpc::Status SubscribeArmAuthorization( + grpc::ServerContext* /* context */, + const mavsdk::rpc::arm_authorizer::SubscribeArmAuthorizationRequest* /* request */, + grpc::ServerWriter* writer) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + return grpc::Status::OK; + } + + auto stream_closed_promise = std::make_shared>(); + auto stream_closed_future = stream_closed_promise->get_future(); + register_stream_stop_promise(stream_closed_promise); + + auto is_finished = std::make_shared(false); + auto subscribe_mutex = std::make_shared(); + + const mavsdk::ArmAuthorizer::ArmAuthorizationHandle handle = + _lazy_plugin.maybe_plugin()->subscribe_arm_authorization( + [this, &writer, &stream_closed_promise, is_finished, subscribe_mutex, &handle]( + const uint32_t arm_authorization) { + rpc::arm_authorizer::ArmAuthorizationResponse rpc_response; + + rpc_response.set_system_id(arm_authorization); + + std::unique_lock lock(*subscribe_mutex); + if (!*is_finished && !writer->Write(rpc_response)) { + _lazy_plugin.maybe_plugin()->unsubscribe_arm_authorization(handle); + + *is_finished = true; + unregister_stream_stop_promise(stream_closed_promise); + stream_closed_promise->set_value(); + } + }); + + stream_closed_future.wait(); + std::unique_lock lock(*subscribe_mutex); + *is_finished = true; + + return grpc::Status::OK; + } + + grpc::Status RespondArmAuthorization( + grpc::ServerContext* /* context */, + const rpc::arm_authorizer::RespondArmAuthorizationRequest* request, + rpc::arm_authorizer::RespondArmAuthorizationResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "RespondArmAuthorization sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->respond_arm_authorization( + translateFromRpcArmAuthorizerDecision(request->arm_authorizer_decision())); + + if (response != nullptr) { + response->set_allocated_command_answer(translateToRpcCommandAnswer(result).release()); + } + + return grpc::Status::OK; + } + + void stop() + { + _stopped.store(true); + for (auto& prom : _stream_stop_promises) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } + } + +private: + void register_stream_stop_promise(std::weak_ptr> prom) + { + // If we have already stopped, set promise immediately and don't add it to list. + if (_stopped.load()) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } else { + _stream_stop_promises.push_back(prom); + } + } + + void unregister_stream_stop_promise(std::shared_ptr> prom) + { + for (auto it = _stream_stop_promises.begin(); it != _stream_stop_promises.end(); + /* ++it */) { + if (it->lock() == prom) { + it = _stream_stop_promises.erase(it); + } else { + ++it; + } + } + } + + LazyPlugin& _lazy_plugin; + + std::atomic _stopped{false}; + std::vector>> _stream_stop_promises{}; +}; + +} // namespace mavsdk_server +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk_server/src/plugins/arm_authorizer_server/arm_authorizer_server_service_impl.h b/src/mavsdk_server/src/plugins/arm_authorizer_server/arm_authorizer_server_service_impl.h new file mode 100644 index 0000000000..aa625dc8dc --- /dev/null +++ b/src/mavsdk_server/src/plugins/arm_authorizer_server/arm_authorizer_server_service_impl.h @@ -0,0 +1,275 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see +// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/arm_authorizer_server/arm_authorizer_server.proto) + +#include "arm_authorizer_server/arm_authorizer_server.grpc.pb.h" +#include "plugins/arm_authorizer_server/arm_authorizer_server.h" + +#include "mavsdk.h" + +#include "lazy_server_plugin.h" + +#include "log.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace mavsdk_server { + +template< + typename ArmAuthorizerServer = ArmAuthorizerServer, + typename LazyServerPlugin = LazyServerPlugin> + +class ArmAuthorizerServerServiceImpl final + : public rpc::arm_authorizer_server::ArmAuthorizerServerService::Service { +public: + ArmAuthorizerServerServiceImpl(LazyServerPlugin& lazy_plugin) : _lazy_plugin(lazy_plugin) {} + + template + void fillResponseWithResult( + ResponseType* response, mavsdk::ArmAuthorizerServer::Result& result) const + { + auto rpc_result = translateToRpcResult(result); + + auto* rpc_arm_authorizer_server_result = + new rpc::arm_authorizer_server::ArmAuthorizerServerResult(); + rpc_arm_authorizer_server_result->set_result(rpc_result); + std::stringstream ss; + ss << result; + rpc_arm_authorizer_server_result->set_result_str(ss.str()); + + response->set_allocated_arm_authorizer_server_result(rpc_arm_authorizer_server_result); + } + + static rpc::arm_authorizer_server::RejectionReason translateToRpcRejectionReason( + const mavsdk::ArmAuthorizerServer::RejectionReason& rejection_reason) + { + switch (rejection_reason) { + default: + LogErr() << "Unknown rejection_reason enum value: " + << static_cast(rejection_reason); + // FALLTHROUGH + case mavsdk::ArmAuthorizerServer::RejectionReason::Generic: + return rpc::arm_authorizer_server::REJECTION_REASON_GENERIC; + case mavsdk::ArmAuthorizerServer::RejectionReason::None: + return rpc::arm_authorizer_server::REJECTION_REASON_NONE; + case mavsdk::ArmAuthorizerServer::RejectionReason::InvalidWaypoint: + return rpc::arm_authorizer_server::REJECTION_REASON_INVALID_WAYPOINT; + case mavsdk::ArmAuthorizerServer::RejectionReason::Timeout: + return rpc::arm_authorizer_server::REJECTION_REASON_TIMEOUT; + case mavsdk::ArmAuthorizerServer::RejectionReason::AirspaceInUse: + return rpc::arm_authorizer_server::REJECTION_REASON_AIRSPACE_IN_USE; + case mavsdk::ArmAuthorizerServer::RejectionReason::BadWeather: + return rpc::arm_authorizer_server::REJECTION_REASON_BAD_WEATHER; + } + } + + static mavsdk::ArmAuthorizerServer::RejectionReason translateFromRpcRejectionReason( + const rpc::arm_authorizer_server::RejectionReason rejection_reason) + { + switch (rejection_reason) { + default: + LogErr() << "Unknown rejection_reason enum value: " + << static_cast(rejection_reason); + // FALLTHROUGH + case rpc::arm_authorizer_server::REJECTION_REASON_GENERIC: + return mavsdk::ArmAuthorizerServer::RejectionReason::Generic; + case rpc::arm_authorizer_server::REJECTION_REASON_NONE: + return mavsdk::ArmAuthorizerServer::RejectionReason::None; + case rpc::arm_authorizer_server::REJECTION_REASON_INVALID_WAYPOINT: + return mavsdk::ArmAuthorizerServer::RejectionReason::InvalidWaypoint; + case rpc::arm_authorizer_server::REJECTION_REASON_TIMEOUT: + return mavsdk::ArmAuthorizerServer::RejectionReason::Timeout; + case rpc::arm_authorizer_server::REJECTION_REASON_AIRSPACE_IN_USE: + return mavsdk::ArmAuthorizerServer::RejectionReason::AirspaceInUse; + case rpc::arm_authorizer_server::REJECTION_REASON_BAD_WEATHER: + return mavsdk::ArmAuthorizerServer::RejectionReason::BadWeather; + } + } + + static rpc::arm_authorizer_server::ArmAuthorizerServerResult::Result + translateToRpcResult(const mavsdk::ArmAuthorizerServer::Result& result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case mavsdk::ArmAuthorizerServer::Result::Unknown: + return rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_UNKNOWN; + case mavsdk::ArmAuthorizerServer::Result::Success: + return rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_SUCCESS; + case mavsdk::ArmAuthorizerServer::Result::Failed: + return rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_FAILED; + } + } + + static mavsdk::ArmAuthorizerServer::Result translateFromRpcResult( + const rpc::arm_authorizer_server::ArmAuthorizerServerResult::Result result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_UNKNOWN: + return mavsdk::ArmAuthorizerServer::Result::Unknown; + case rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_SUCCESS: + return mavsdk::ArmAuthorizerServer::Result::Success; + case rpc::arm_authorizer_server::ArmAuthorizerServerResult_Result_RESULT_FAILED: + return mavsdk::ArmAuthorizerServer::Result::Failed; + } + } + + grpc::Status SubscribeArmAuthorization( + grpc::ServerContext* /* context */, + const mavsdk::rpc::arm_authorizer_server::SubscribeArmAuthorizationRequest* /* request */, + grpc::ServerWriter* writer) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + return grpc::Status::OK; + } + + auto stream_closed_promise = std::make_shared>(); + auto stream_closed_future = stream_closed_promise->get_future(); + register_stream_stop_promise(stream_closed_promise); + + auto is_finished = std::make_shared(false); + auto subscribe_mutex = std::make_shared(); + + const mavsdk::ArmAuthorizerServer::ArmAuthorizationHandle handle = + _lazy_plugin.maybe_plugin()->subscribe_arm_authorization( + [this, &writer, &stream_closed_promise, is_finished, subscribe_mutex, &handle]( + const uint32_t arm_authorization) { + rpc::arm_authorizer_server::ArmAuthorizationResponse rpc_response; + + rpc_response.set_system_id(arm_authorization); + + std::unique_lock lock(*subscribe_mutex); + if (!*is_finished && !writer->Write(rpc_response)) { + _lazy_plugin.maybe_plugin()->unsubscribe_arm_authorization(handle); + + *is_finished = true; + unregister_stream_stop_promise(stream_closed_promise); + stream_closed_promise->set_value(); + } + }); + + stream_closed_future.wait(); + std::unique_lock lock(*subscribe_mutex); + *is_finished = true; + + return grpc::Status::OK; + } + + grpc::Status AcceptArmAuthorization( + grpc::ServerContext* /* context */, + const rpc::arm_authorizer_server::AcceptArmAuthorizationRequest* request, + rpc::arm_authorizer_server::AcceptArmAuthorizationResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + // For server plugins, this should never happen, they should always be + // constructible. + auto result = mavsdk::ArmAuthorizerServer::Result::Unknown; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "AcceptArmAuthorization sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = + _lazy_plugin.maybe_plugin()->accept_arm_authorization(request->valid_time_s()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status RejectArmAuthorization( + grpc::ServerContext* /* context */, + const rpc::arm_authorizer_server::RejectArmAuthorizationRequest* request, + rpc::arm_authorizer_server::RejectArmAuthorizationResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + // For server plugins, this should never happen, they should always be + // constructible. + auto result = mavsdk::ArmAuthorizerServer::Result::Unknown; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "RejectArmAuthorization sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->reject_arm_authorization( + request->temporarily(), + translateFromRpcRejectionReason(request->reason()), + request->extra_info()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + void stop() + { + _stopped.store(true); + for (auto& prom : _stream_stop_promises) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } + } + +private: + void register_stream_stop_promise(std::weak_ptr> prom) + { + // If we have already stopped, set promise immediately and don't add it to list. + if (_stopped.load()) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } else { + _stream_stop_promises.push_back(prom); + } + } + + void unregister_stream_stop_promise(std::shared_ptr> prom) + { + for (auto it = _stream_stop_promises.begin(); it != _stream_stop_promises.end(); + /* ++it */) { + if (it->lock() == prom) { + it = _stream_stop_promises.erase(it); + } else { + ++it; + } + } + } + + LazyServerPlugin& _lazy_plugin; + + std::atomic _stopped{false}; + std::vector>> _stream_stop_promises{}; +}; + +} // namespace mavsdk_server +} // namespace mavsdk \ No newline at end of file diff --git a/src/plugins.txt b/src/plugins.txt index 58495d4040..cf044cdb38 100644 --- a/src/plugins.txt +++ b/src/plugins.txt @@ -1,5 +1,6 @@ action action_server +arm_authorizer_server calibration camera camera_server