//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: action.proto
//

//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import GRPC
import NIO
import SwiftProtobuf


/// Enable simple actions such as arming, taking off, and landing.
///
/// Usage: instantiate `Mavsdk_Rpc_Action_ActionServiceClient`, then call methods of this protocol to make API calls.
internal protocol Mavsdk_Rpc_Action_ActionServiceClientProtocol: GRPCClient {
  var serviceName: String { get }
  var interceptors: Mavsdk_Rpc_Action_ActionServiceClientInterceptorFactoryProtocol? { get }

  func arm(
    _ request: Mavsdk_Rpc_Action_ArmRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_ArmRequest, Mavsdk_Rpc_Action_ArmResponse>

  func disarm(
    _ request: Mavsdk_Rpc_Action_DisarmRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_DisarmRequest, Mavsdk_Rpc_Action_DisarmResponse>

  func takeoff(
    _ request: Mavsdk_Rpc_Action_TakeoffRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_TakeoffRequest, Mavsdk_Rpc_Action_TakeoffResponse>

  func land(
    _ request: Mavsdk_Rpc_Action_LandRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_LandRequest, Mavsdk_Rpc_Action_LandResponse>

  func reboot(
    _ request: Mavsdk_Rpc_Action_RebootRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_RebootRequest, Mavsdk_Rpc_Action_RebootResponse>

  func shutdown(
    _ request: Mavsdk_Rpc_Action_ShutdownRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_ShutdownRequest, Mavsdk_Rpc_Action_ShutdownResponse>

  func terminate(
    _ request: Mavsdk_Rpc_Action_TerminateRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_TerminateRequest, Mavsdk_Rpc_Action_TerminateResponse>

  func kill(
    _ request: Mavsdk_Rpc_Action_KillRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_KillRequest, Mavsdk_Rpc_Action_KillResponse>

  func returnToLaunch(
    _ request: Mavsdk_Rpc_Action_ReturnToLaunchRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_ReturnToLaunchRequest, Mavsdk_Rpc_Action_ReturnToLaunchResponse>

  func gotoLocation(
    _ request: Mavsdk_Rpc_Action_GotoLocationRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_GotoLocationRequest, Mavsdk_Rpc_Action_GotoLocationResponse>

  func doOrbit(
    _ request: Mavsdk_Rpc_Action_DoOrbitRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_DoOrbitRequest, Mavsdk_Rpc_Action_DoOrbitResponse>

  func hold(
    _ request: Mavsdk_Rpc_Action_HoldRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_HoldRequest, Mavsdk_Rpc_Action_HoldResponse>

  func setActuator(
    _ request: Mavsdk_Rpc_Action_SetActuatorRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetActuatorRequest, Mavsdk_Rpc_Action_SetActuatorResponse>

  func transitionToFixedwing(
    _ request: Mavsdk_Rpc_Action_TransitionToFixedwingRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_TransitionToFixedwingRequest, Mavsdk_Rpc_Action_TransitionToFixedwingResponse>

  func transitionToMulticopter(
    _ request: Mavsdk_Rpc_Action_TransitionToMulticopterRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_TransitionToMulticopterRequest, Mavsdk_Rpc_Action_TransitionToMulticopterResponse>

  func getTakeoffAltitude(
    _ request: Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse>

  func setTakeoffAltitude(
    _ request: Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse>

  func getMaximumSpeed(
    _ request: Mavsdk_Rpc_Action_GetMaximumSpeedRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetMaximumSpeedRequest, Mavsdk_Rpc_Action_GetMaximumSpeedResponse>

  func setMaximumSpeed(
    _ request: Mavsdk_Rpc_Action_SetMaximumSpeedRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetMaximumSpeedRequest, Mavsdk_Rpc_Action_SetMaximumSpeedResponse>

  func getReturnToLaunchAltitude(
    _ request: Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse>

  func setReturnToLaunchAltitude(
    _ request: Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse>

  func setCurrentSpeed(
    _ request: Mavsdk_Rpc_Action_SetCurrentSpeedRequest,
    callOptions: CallOptions?
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetCurrentSpeedRequest, Mavsdk_Rpc_Action_SetCurrentSpeedResponse>
}

extension Mavsdk_Rpc_Action_ActionServiceClientProtocol {
  internal var serviceName: String {
    return "mavsdk.rpc.action.ActionService"
  }

  ///
  /// Send command to arm the drone.
  ///
  /// Arming a drone normally causes motors to spin at idle.
  /// Before arming take all safety precautions and stand clear of the drone!
  ///
  /// - Parameters:
  ///   - request: Request to send to Arm.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func arm(
    _ request: Mavsdk_Rpc_Action_ArmRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_ArmRequest, Mavsdk_Rpc_Action_ArmResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Arm",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeArmInterceptors() ?? []
    )
  }

  ///
  /// Send command to disarm the drone.
  ///
  /// This will disarm a drone that considers itself landed. If flying, the drone should
  /// reject the disarm command. Disarming means that all motors will stop.
  ///
  /// - Parameters:
  ///   - request: Request to send to Disarm.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func disarm(
    _ request: Mavsdk_Rpc_Action_DisarmRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_DisarmRequest, Mavsdk_Rpc_Action_DisarmResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Disarm",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeDisarmInterceptors() ?? []
    )
  }

  ///
  /// Send command to take off and hover.
  ///
  /// This switches the drone into position control mode and commands
  /// it to take off and hover at the takeoff altitude.
  ///
  /// Note that the vehicle must be armed before it can take off.
  ///
  /// - Parameters:
  ///   - request: Request to send to Takeoff.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func takeoff(
    _ request: Mavsdk_Rpc_Action_TakeoffRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_TakeoffRequest, Mavsdk_Rpc_Action_TakeoffResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Takeoff",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeTakeoffInterceptors() ?? []
    )
  }

  ///
  /// Send command to land at the current position.
  ///
  /// This switches the drone to 'Land' flight mode.
  ///
  /// - Parameters:
  ///   - request: Request to send to Land.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func land(
    _ request: Mavsdk_Rpc_Action_LandRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_LandRequest, Mavsdk_Rpc_Action_LandResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Land",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeLandInterceptors() ?? []
    )
  }

  ///
  /// Send command to reboot the drone components.
  ///
  /// This will reboot the autopilot, companion computer, camera and gimbal.
  ///
  /// - Parameters:
  ///   - request: Request to send to Reboot.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func reboot(
    _ request: Mavsdk_Rpc_Action_RebootRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_RebootRequest, Mavsdk_Rpc_Action_RebootResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Reboot",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeRebootInterceptors() ?? []
    )
  }

  ///
  /// Send command to shut down the drone components.
  ///
  /// This will shut down the autopilot, onboard computer, camera and gimbal.
  /// This command should only be used when the autopilot is disarmed and autopilots commonly
  /// reject it if they are not already ready to shut down.
  ///
  /// - Parameters:
  ///   - request: Request to send to Shutdown.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func shutdown(
    _ request: Mavsdk_Rpc_Action_ShutdownRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_ShutdownRequest, Mavsdk_Rpc_Action_ShutdownResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Shutdown",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeShutdownInterceptors() ?? []
    )
  }

  ///
  /// Send command to terminate the drone.
  ///
  /// This will run the terminate routine as configured on the drone (e.g. disarm and open the parachute).
  ///
  /// - Parameters:
  ///   - request: Request to send to Terminate.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func terminate(
    _ request: Mavsdk_Rpc_Action_TerminateRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_TerminateRequest, Mavsdk_Rpc_Action_TerminateResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Terminate",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeTerminateInterceptors() ?? []
    )
  }

  ///
  /// Send command to kill the drone.
  ///
  /// This will disarm a drone irrespective of whether it is landed or flying.
  /// Note that the drone will fall out of the sky if this command is used while flying.
  ///
  /// - Parameters:
  ///   - request: Request to send to Kill.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func kill(
    _ request: Mavsdk_Rpc_Action_KillRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_KillRequest, Mavsdk_Rpc_Action_KillResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Kill",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeKillInterceptors() ?? []
    )
  }

  ///
  /// Send command to return to the launch (takeoff) position and land.
  ///
  /// This switches the drone into [Return mode](https://docs.px4.io/master/en/flight_modes/return.html) which
  /// generally means it will rise up to a certain altitude to clear any obstacles before heading
  /// back to the launch (takeoff) position and land there.
  ///
  /// - Parameters:
  ///   - request: Request to send to ReturnToLaunch.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func returnToLaunch(
    _ request: Mavsdk_Rpc_Action_ReturnToLaunchRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_ReturnToLaunchRequest, Mavsdk_Rpc_Action_ReturnToLaunchResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/ReturnToLaunch",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeReturnToLaunchInterceptors() ?? []
    )
  }

  ///
  /// Send command to move the vehicle to a specific global position.
  ///
  /// The latitude and longitude are given in degrees (WGS84 frame) and the altitude
  /// in meters AMSL (above mean sea level).
  ///
  /// The yaw angle is in degrees (frame is NED, 0 is North, positive is clockwise).
  ///
  /// - Parameters:
  ///   - request: Request to send to GotoLocation.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func gotoLocation(
    _ request: Mavsdk_Rpc_Action_GotoLocationRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_GotoLocationRequest, Mavsdk_Rpc_Action_GotoLocationResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/GotoLocation",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeGotoLocationInterceptors() ?? []
    )
  }

  ///
  /// Send command do orbit to the drone.
  ///
  /// This will run the orbit routine with the given parameters.
  ///
  /// - Parameters:
  ///   - request: Request to send to DoOrbit.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func doOrbit(
    _ request: Mavsdk_Rpc_Action_DoOrbitRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_DoOrbitRequest, Mavsdk_Rpc_Action_DoOrbitResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/DoOrbit",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeDoOrbitInterceptors() ?? []
    )
  }

  ///
  /// Send command to hold position (a.k.a. "Loiter").
  ///
  /// Sends a command to drone to change to Hold flight mode, causing the
  /// vehicle to stop and maintain its current GPS position and altitude.
  ///
  /// Note: this command is specific to the PX4 Autopilot flight stack as
  /// it implies a change to a PX4-specific mode.
  ///
  /// - Parameters:
  ///   - request: Request to send to Hold.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func hold(
    _ request: Mavsdk_Rpc_Action_HoldRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_HoldRequest, Mavsdk_Rpc_Action_HoldResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/Hold",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeHoldInterceptors() ?? []
    )
  }

  ///
  /// Send command to set the value of an actuator.
  ///
  /// - Parameters:
  ///   - request: Request to send to SetActuator.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func setActuator(
    _ request: Mavsdk_Rpc_Action_SetActuatorRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetActuatorRequest, Mavsdk_Rpc_Action_SetActuatorResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/SetActuator",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeSetActuatorInterceptors() ?? []
    )
  }

  ///
  /// Send command to transition the drone to fixedwing.
  ///
  /// The associated action will only be executed for VTOL vehicles (on other vehicle types the
  /// command will fail). The command will succeed if called when the vehicle
  /// is already in fixedwing mode.
  ///
  /// - Parameters:
  ///   - request: Request to send to TransitionToFixedwing.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func transitionToFixedwing(
    _ request: Mavsdk_Rpc_Action_TransitionToFixedwingRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_TransitionToFixedwingRequest, Mavsdk_Rpc_Action_TransitionToFixedwingResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/TransitionToFixedwing",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeTransitionToFixedwingInterceptors() ?? []
    )
  }

  ///
  /// Send command to transition the drone to multicopter.
  ///
  /// The associated action will only be executed for VTOL vehicles (on other vehicle types the
  /// command will fail). The command will succeed if called when the vehicle
  /// is already in multicopter mode.
  ///
  /// - Parameters:
  ///   - request: Request to send to TransitionToMulticopter.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func transitionToMulticopter(
    _ request: Mavsdk_Rpc_Action_TransitionToMulticopterRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_TransitionToMulticopterRequest, Mavsdk_Rpc_Action_TransitionToMulticopterResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/TransitionToMulticopter",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeTransitionToMulticopterInterceptors() ?? []
    )
  }

  ///
  /// Get the takeoff altitude (in meters above ground).
  ///
  /// - Parameters:
  ///   - request: Request to send to GetTakeoffAltitude.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func getTakeoffAltitude(
    _ request: Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/GetTakeoffAltitude",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeGetTakeoffAltitudeInterceptors() ?? []
    )
  }

  ///
  /// Set takeoff altitude (in meters above ground).
  ///
  /// - Parameters:
  ///   - request: Request to send to SetTakeoffAltitude.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func setTakeoffAltitude(
    _ request: Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/SetTakeoffAltitude",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeSetTakeoffAltitudeInterceptors() ?? []
    )
  }

  ///
  /// Get the vehicle maximum speed (in metres/second).
  ///
  /// - Parameters:
  ///   - request: Request to send to GetMaximumSpeed.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func getMaximumSpeed(
    _ request: Mavsdk_Rpc_Action_GetMaximumSpeedRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetMaximumSpeedRequest, Mavsdk_Rpc_Action_GetMaximumSpeedResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/GetMaximumSpeed",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeGetMaximumSpeedInterceptors() ?? []
    )
  }

  ///
  /// Set vehicle maximum speed (in metres/second).
  ///
  /// - Parameters:
  ///   - request: Request to send to SetMaximumSpeed.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func setMaximumSpeed(
    _ request: Mavsdk_Rpc_Action_SetMaximumSpeedRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetMaximumSpeedRequest, Mavsdk_Rpc_Action_SetMaximumSpeedResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/SetMaximumSpeed",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeSetMaximumSpeedInterceptors() ?? []
    )
  }

  ///
  /// Get the return to launch minimum return altitude (in meters).
  ///
  /// - Parameters:
  ///   - request: Request to send to GetReturnToLaunchAltitude.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func getReturnToLaunchAltitude(
    _ request: Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/GetReturnToLaunchAltitude",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeGetReturnToLaunchAltitudeInterceptors() ?? []
    )
  }

  ///
  /// Set the return to launch minimum return altitude (in meters).
  ///
  /// - Parameters:
  ///   - request: Request to send to SetReturnToLaunchAltitude.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func setReturnToLaunchAltitude(
    _ request: Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/SetReturnToLaunchAltitude",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeSetReturnToLaunchAltitudeInterceptors() ?? []
    )
  }

  ///
  /// Set current speed.
  ///
  /// This will set the speed during a mission, reposition, and similar.
  /// It is ephemeral, so not stored on the drone and does not survive a reboot.
  ///
  /// - Parameters:
  ///   - request: Request to send to SetCurrentSpeed.
  ///   - callOptions: Call options.
  /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  internal func setCurrentSpeed(
    _ request: Mavsdk_Rpc_Action_SetCurrentSpeedRequest,
    callOptions: CallOptions? = nil
  ) -> UnaryCall<Mavsdk_Rpc_Action_SetCurrentSpeedRequest, Mavsdk_Rpc_Action_SetCurrentSpeedResponse> {
    return self.makeUnaryCall(
      path: "/mavsdk.rpc.action.ActionService/SetCurrentSpeed",
      request: request,
      callOptions: callOptions ?? self.defaultCallOptions,
      interceptors: self.interceptors?.makeSetCurrentSpeedInterceptors() ?? []
    )
  }
}

internal protocol Mavsdk_Rpc_Action_ActionServiceClientInterceptorFactoryProtocol {

  /// - Returns: Interceptors to use when invoking 'arm'.
  func makeArmInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_ArmRequest, Mavsdk_Rpc_Action_ArmResponse>]

  /// - Returns: Interceptors to use when invoking 'disarm'.
  func makeDisarmInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_DisarmRequest, Mavsdk_Rpc_Action_DisarmResponse>]

  /// - Returns: Interceptors to use when invoking 'takeoff'.
  func makeTakeoffInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_TakeoffRequest, Mavsdk_Rpc_Action_TakeoffResponse>]

  /// - Returns: Interceptors to use when invoking 'land'.
  func makeLandInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_LandRequest, Mavsdk_Rpc_Action_LandResponse>]

  /// - Returns: Interceptors to use when invoking 'reboot'.
  func makeRebootInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_RebootRequest, Mavsdk_Rpc_Action_RebootResponse>]

  /// - Returns: Interceptors to use when invoking 'shutdown'.
  func makeShutdownInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_ShutdownRequest, Mavsdk_Rpc_Action_ShutdownResponse>]

  /// - Returns: Interceptors to use when invoking 'terminate'.
  func makeTerminateInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_TerminateRequest, Mavsdk_Rpc_Action_TerminateResponse>]

  /// - Returns: Interceptors to use when invoking 'kill'.
  func makeKillInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_KillRequest, Mavsdk_Rpc_Action_KillResponse>]

  /// - Returns: Interceptors to use when invoking 'returnToLaunch'.
  func makeReturnToLaunchInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_ReturnToLaunchRequest, Mavsdk_Rpc_Action_ReturnToLaunchResponse>]

  /// - Returns: Interceptors to use when invoking 'gotoLocation'.
  func makeGotoLocationInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_GotoLocationRequest, Mavsdk_Rpc_Action_GotoLocationResponse>]

  /// - Returns: Interceptors to use when invoking 'doOrbit'.
  func makeDoOrbitInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_DoOrbitRequest, Mavsdk_Rpc_Action_DoOrbitResponse>]

  /// - Returns: Interceptors to use when invoking 'hold'.
  func makeHoldInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_HoldRequest, Mavsdk_Rpc_Action_HoldResponse>]

  /// - Returns: Interceptors to use when invoking 'setActuator'.
  func makeSetActuatorInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_SetActuatorRequest, Mavsdk_Rpc_Action_SetActuatorResponse>]

  /// - Returns: Interceptors to use when invoking 'transitionToFixedwing'.
  func makeTransitionToFixedwingInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_TransitionToFixedwingRequest, Mavsdk_Rpc_Action_TransitionToFixedwingResponse>]

  /// - Returns: Interceptors to use when invoking 'transitionToMulticopter'.
  func makeTransitionToMulticopterInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_TransitionToMulticopterRequest, Mavsdk_Rpc_Action_TransitionToMulticopterResponse>]

  /// - Returns: Interceptors to use when invoking 'getTakeoffAltitude'.
  func makeGetTakeoffAltitudeInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse>]

  /// - Returns: Interceptors to use when invoking 'setTakeoffAltitude'.
  func makeSetTakeoffAltitudeInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse>]

  /// - Returns: Interceptors to use when invoking 'getMaximumSpeed'.
  func makeGetMaximumSpeedInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_GetMaximumSpeedRequest, Mavsdk_Rpc_Action_GetMaximumSpeedResponse>]

  /// - Returns: Interceptors to use when invoking 'setMaximumSpeed'.
  func makeSetMaximumSpeedInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_SetMaximumSpeedRequest, Mavsdk_Rpc_Action_SetMaximumSpeedResponse>]

  /// - Returns: Interceptors to use when invoking 'getReturnToLaunchAltitude'.
  func makeGetReturnToLaunchAltitudeInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse>]

  /// - Returns: Interceptors to use when invoking 'setReturnToLaunchAltitude'.
  func makeSetReturnToLaunchAltitudeInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse>]

  /// - Returns: Interceptors to use when invoking 'setCurrentSpeed'.
  func makeSetCurrentSpeedInterceptors() -> [ClientInterceptor<Mavsdk_Rpc_Action_SetCurrentSpeedRequest, Mavsdk_Rpc_Action_SetCurrentSpeedResponse>]
}

internal final class Mavsdk_Rpc_Action_ActionServiceClient: Mavsdk_Rpc_Action_ActionServiceClientProtocol {
  internal let channel: GRPCChannel
  internal var defaultCallOptions: CallOptions
  internal var interceptors: Mavsdk_Rpc_Action_ActionServiceClientInterceptorFactoryProtocol?

  /// Creates a client for the mavsdk.rpc.action.ActionService service.
  ///
  /// - Parameters:
  ///   - channel: `GRPCChannel` to the service host.
  ///   - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  ///   - interceptors: A factory providing interceptors for each RPC.
  internal init(
    channel: GRPCChannel,
    defaultCallOptions: CallOptions = CallOptions(),
    interceptors: Mavsdk_Rpc_Action_ActionServiceClientInterceptorFactoryProtocol? = nil
  ) {
    self.channel = channel
    self.defaultCallOptions = defaultCallOptions
    self.interceptors = interceptors
  }
}

/// Enable simple actions such as arming, taking off, and landing.
///
/// To build a server, implement a class that conforms to this protocol.
internal protocol Mavsdk_Rpc_Action_ActionServiceProvider: CallHandlerProvider {
  var interceptors: Mavsdk_Rpc_Action_ActionServiceServerInterceptorFactoryProtocol? { get }

  ///
  /// Send command to arm the drone.
  ///
  /// Arming a drone normally causes motors to spin at idle.
  /// Before arming take all safety precautions and stand clear of the drone!
  func arm(request: Mavsdk_Rpc_Action_ArmRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_ArmResponse>

  ///
  /// Send command to disarm the drone.
  ///
  /// This will disarm a drone that considers itself landed. If flying, the drone should
  /// reject the disarm command. Disarming means that all motors will stop.
  func disarm(request: Mavsdk_Rpc_Action_DisarmRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_DisarmResponse>

  ///
  /// Send command to take off and hover.
  ///
  /// This switches the drone into position control mode and commands
  /// it to take off and hover at the takeoff altitude.
  ///
  /// Note that the vehicle must be armed before it can take off.
  func takeoff(request: Mavsdk_Rpc_Action_TakeoffRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_TakeoffResponse>

  ///
  /// Send command to land at the current position.
  ///
  /// This switches the drone to 'Land' flight mode.
  func land(request: Mavsdk_Rpc_Action_LandRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_LandResponse>

  ///
  /// Send command to reboot the drone components.
  ///
  /// This will reboot the autopilot, companion computer, camera and gimbal.
  func reboot(request: Mavsdk_Rpc_Action_RebootRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_RebootResponse>

  ///
  /// Send command to shut down the drone components.
  ///
  /// This will shut down the autopilot, onboard computer, camera and gimbal.
  /// This command should only be used when the autopilot is disarmed and autopilots commonly
  /// reject it if they are not already ready to shut down.
  func shutdown(request: Mavsdk_Rpc_Action_ShutdownRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_ShutdownResponse>

  ///
  /// Send command to terminate the drone.
  ///
  /// This will run the terminate routine as configured on the drone (e.g. disarm and open the parachute).
  func terminate(request: Mavsdk_Rpc_Action_TerminateRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_TerminateResponse>

  ///
  /// Send command to kill the drone.
  ///
  /// This will disarm a drone irrespective of whether it is landed or flying.
  /// Note that the drone will fall out of the sky if this command is used while flying.
  func kill(request: Mavsdk_Rpc_Action_KillRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_KillResponse>

  ///
  /// Send command to return to the launch (takeoff) position and land.
  ///
  /// This switches the drone into [Return mode](https://docs.px4.io/master/en/flight_modes/return.html) which
  /// generally means it will rise up to a certain altitude to clear any obstacles before heading
  /// back to the launch (takeoff) position and land there.
  func returnToLaunch(request: Mavsdk_Rpc_Action_ReturnToLaunchRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_ReturnToLaunchResponse>

  ///
  /// Send command to move the vehicle to a specific global position.
  ///
  /// The latitude and longitude are given in degrees (WGS84 frame) and the altitude
  /// in meters AMSL (above mean sea level).
  ///
  /// The yaw angle is in degrees (frame is NED, 0 is North, positive is clockwise).
  func gotoLocation(request: Mavsdk_Rpc_Action_GotoLocationRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_GotoLocationResponse>

  ///
  /// Send command do orbit to the drone.
  ///
  /// This will run the orbit routine with the given parameters.
  func doOrbit(request: Mavsdk_Rpc_Action_DoOrbitRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_DoOrbitResponse>

  ///
  /// Send command to hold position (a.k.a. "Loiter").
  ///
  /// Sends a command to drone to change to Hold flight mode, causing the
  /// vehicle to stop and maintain its current GPS position and altitude.
  ///
  /// Note: this command is specific to the PX4 Autopilot flight stack as
  /// it implies a change to a PX4-specific mode.
  func hold(request: Mavsdk_Rpc_Action_HoldRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_HoldResponse>

  ///
  /// Send command to set the value of an actuator.
  func setActuator(request: Mavsdk_Rpc_Action_SetActuatorRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_SetActuatorResponse>

  ///
  /// Send command to transition the drone to fixedwing.
  ///
  /// The associated action will only be executed for VTOL vehicles (on other vehicle types the
  /// command will fail). The command will succeed if called when the vehicle
  /// is already in fixedwing mode.
  func transitionToFixedwing(request: Mavsdk_Rpc_Action_TransitionToFixedwingRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_TransitionToFixedwingResponse>

  ///
  /// Send command to transition the drone to multicopter.
  ///
  /// The associated action will only be executed for VTOL vehicles (on other vehicle types the
  /// command will fail). The command will succeed if called when the vehicle
  /// is already in multicopter mode.
  func transitionToMulticopter(request: Mavsdk_Rpc_Action_TransitionToMulticopterRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_TransitionToMulticopterResponse>

  ///
  /// Get the takeoff altitude (in meters above ground).
  func getTakeoffAltitude(request: Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse>

  ///
  /// Set takeoff altitude (in meters above ground).
  func setTakeoffAltitude(request: Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse>

  ///
  /// Get the vehicle maximum speed (in metres/second).
  func getMaximumSpeed(request: Mavsdk_Rpc_Action_GetMaximumSpeedRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_GetMaximumSpeedResponse>

  ///
  /// Set vehicle maximum speed (in metres/second).
  func setMaximumSpeed(request: Mavsdk_Rpc_Action_SetMaximumSpeedRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_SetMaximumSpeedResponse>

  ///
  /// Get the return to launch minimum return altitude (in meters).
  func getReturnToLaunchAltitude(request: Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse>

  ///
  /// Set the return to launch minimum return altitude (in meters).
  func setReturnToLaunchAltitude(request: Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse>

  ///
  /// Set current speed.
  ///
  /// This will set the speed during a mission, reposition, and similar.
  /// It is ephemeral, so not stored on the drone and does not survive a reboot.
  func setCurrentSpeed(request: Mavsdk_Rpc_Action_SetCurrentSpeedRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Mavsdk_Rpc_Action_SetCurrentSpeedResponse>
}

extension Mavsdk_Rpc_Action_ActionServiceProvider {
  internal var serviceName: Substring { return "mavsdk.rpc.action.ActionService" }

  /// Determines, calls and returns the appropriate request handler, depending on the request's method.
  /// Returns nil for methods not handled by this service.
  internal func handle(
    method name: Substring,
    context: CallHandlerContext
  ) -> GRPCServerHandlerProtocol? {
    switch name {
    case "Arm":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_ArmRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_ArmResponse>(),
        interceptors: self.interceptors?.makeArmInterceptors() ?? [],
        userFunction: self.arm(request:context:)
      )

    case "Disarm":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_DisarmRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_DisarmResponse>(),
        interceptors: self.interceptors?.makeDisarmInterceptors() ?? [],
        userFunction: self.disarm(request:context:)
      )

    case "Takeoff":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_TakeoffRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_TakeoffResponse>(),
        interceptors: self.interceptors?.makeTakeoffInterceptors() ?? [],
        userFunction: self.takeoff(request:context:)
      )

    case "Land":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_LandRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_LandResponse>(),
        interceptors: self.interceptors?.makeLandInterceptors() ?? [],
        userFunction: self.land(request:context:)
      )

    case "Reboot":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_RebootRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_RebootResponse>(),
        interceptors: self.interceptors?.makeRebootInterceptors() ?? [],
        userFunction: self.reboot(request:context:)
      )

    case "Shutdown":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_ShutdownRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_ShutdownResponse>(),
        interceptors: self.interceptors?.makeShutdownInterceptors() ?? [],
        userFunction: self.shutdown(request:context:)
      )

    case "Terminate":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_TerminateRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_TerminateResponse>(),
        interceptors: self.interceptors?.makeTerminateInterceptors() ?? [],
        userFunction: self.terminate(request:context:)
      )

    case "Kill":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_KillRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_KillResponse>(),
        interceptors: self.interceptors?.makeKillInterceptors() ?? [],
        userFunction: self.kill(request:context:)
      )

    case "ReturnToLaunch":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_ReturnToLaunchRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_ReturnToLaunchResponse>(),
        interceptors: self.interceptors?.makeReturnToLaunchInterceptors() ?? [],
        userFunction: self.returnToLaunch(request:context:)
      )

    case "GotoLocation":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_GotoLocationRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_GotoLocationResponse>(),
        interceptors: self.interceptors?.makeGotoLocationInterceptors() ?? [],
        userFunction: self.gotoLocation(request:context:)
      )

    case "DoOrbit":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_DoOrbitRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_DoOrbitResponse>(),
        interceptors: self.interceptors?.makeDoOrbitInterceptors() ?? [],
        userFunction: self.doOrbit(request:context:)
      )

    case "Hold":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_HoldRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_HoldResponse>(),
        interceptors: self.interceptors?.makeHoldInterceptors() ?? [],
        userFunction: self.hold(request:context:)
      )

    case "SetActuator":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_SetActuatorRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_SetActuatorResponse>(),
        interceptors: self.interceptors?.makeSetActuatorInterceptors() ?? [],
        userFunction: self.setActuator(request:context:)
      )

    case "TransitionToFixedwing":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_TransitionToFixedwingRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_TransitionToFixedwingResponse>(),
        interceptors: self.interceptors?.makeTransitionToFixedwingInterceptors() ?? [],
        userFunction: self.transitionToFixedwing(request:context:)
      )

    case "TransitionToMulticopter":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_TransitionToMulticopterRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_TransitionToMulticopterResponse>(),
        interceptors: self.interceptors?.makeTransitionToMulticopterInterceptors() ?? [],
        userFunction: self.transitionToMulticopter(request:context:)
      )

    case "GetTakeoffAltitude":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse>(),
        interceptors: self.interceptors?.makeGetTakeoffAltitudeInterceptors() ?? [],
        userFunction: self.getTakeoffAltitude(request:context:)
      )

    case "SetTakeoffAltitude":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse>(),
        interceptors: self.interceptors?.makeSetTakeoffAltitudeInterceptors() ?? [],
        userFunction: self.setTakeoffAltitude(request:context:)
      )

    case "GetMaximumSpeed":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_GetMaximumSpeedRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_GetMaximumSpeedResponse>(),
        interceptors: self.interceptors?.makeGetMaximumSpeedInterceptors() ?? [],
        userFunction: self.getMaximumSpeed(request:context:)
      )

    case "SetMaximumSpeed":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_SetMaximumSpeedRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_SetMaximumSpeedResponse>(),
        interceptors: self.interceptors?.makeSetMaximumSpeedInterceptors() ?? [],
        userFunction: self.setMaximumSpeed(request:context:)
      )

    case "GetReturnToLaunchAltitude":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse>(),
        interceptors: self.interceptors?.makeGetReturnToLaunchAltitudeInterceptors() ?? [],
        userFunction: self.getReturnToLaunchAltitude(request:context:)
      )

    case "SetReturnToLaunchAltitude":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse>(),
        interceptors: self.interceptors?.makeSetReturnToLaunchAltitudeInterceptors() ?? [],
        userFunction: self.setReturnToLaunchAltitude(request:context:)
      )

    case "SetCurrentSpeed":
      return UnaryServerHandler(
        context: context,
        requestDeserializer: ProtobufDeserializer<Mavsdk_Rpc_Action_SetCurrentSpeedRequest>(),
        responseSerializer: ProtobufSerializer<Mavsdk_Rpc_Action_SetCurrentSpeedResponse>(),
        interceptors: self.interceptors?.makeSetCurrentSpeedInterceptors() ?? [],
        userFunction: self.setCurrentSpeed(request:context:)
      )

    default:
      return nil
    }
  }
}

internal protocol Mavsdk_Rpc_Action_ActionServiceServerInterceptorFactoryProtocol {

  /// - Returns: Interceptors to use when handling 'arm'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeArmInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_ArmRequest, Mavsdk_Rpc_Action_ArmResponse>]

  /// - Returns: Interceptors to use when handling 'disarm'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeDisarmInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_DisarmRequest, Mavsdk_Rpc_Action_DisarmResponse>]

  /// - Returns: Interceptors to use when handling 'takeoff'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeTakeoffInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_TakeoffRequest, Mavsdk_Rpc_Action_TakeoffResponse>]

  /// - Returns: Interceptors to use when handling 'land'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeLandInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_LandRequest, Mavsdk_Rpc_Action_LandResponse>]

  /// - Returns: Interceptors to use when handling 'reboot'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeRebootInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_RebootRequest, Mavsdk_Rpc_Action_RebootResponse>]

  /// - Returns: Interceptors to use when handling 'shutdown'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeShutdownInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_ShutdownRequest, Mavsdk_Rpc_Action_ShutdownResponse>]

  /// - Returns: Interceptors to use when handling 'terminate'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeTerminateInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_TerminateRequest, Mavsdk_Rpc_Action_TerminateResponse>]

  /// - Returns: Interceptors to use when handling 'kill'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeKillInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_KillRequest, Mavsdk_Rpc_Action_KillResponse>]

  /// - Returns: Interceptors to use when handling 'returnToLaunch'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeReturnToLaunchInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_ReturnToLaunchRequest, Mavsdk_Rpc_Action_ReturnToLaunchResponse>]

  /// - Returns: Interceptors to use when handling 'gotoLocation'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeGotoLocationInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_GotoLocationRequest, Mavsdk_Rpc_Action_GotoLocationResponse>]

  /// - Returns: Interceptors to use when handling 'doOrbit'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeDoOrbitInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_DoOrbitRequest, Mavsdk_Rpc_Action_DoOrbitResponse>]

  /// - Returns: Interceptors to use when handling 'hold'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeHoldInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_HoldRequest, Mavsdk_Rpc_Action_HoldResponse>]

  /// - Returns: Interceptors to use when handling 'setActuator'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeSetActuatorInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_SetActuatorRequest, Mavsdk_Rpc_Action_SetActuatorResponse>]

  /// - Returns: Interceptors to use when handling 'transitionToFixedwing'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeTransitionToFixedwingInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_TransitionToFixedwingRequest, Mavsdk_Rpc_Action_TransitionToFixedwingResponse>]

  /// - Returns: Interceptors to use when handling 'transitionToMulticopter'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeTransitionToMulticopterInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_TransitionToMulticopterRequest, Mavsdk_Rpc_Action_TransitionToMulticopterResponse>]

  /// - Returns: Interceptors to use when handling 'getTakeoffAltitude'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeGetTakeoffAltitudeInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_GetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_GetTakeoffAltitudeResponse>]

  /// - Returns: Interceptors to use when handling 'setTakeoffAltitude'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeSetTakeoffAltitudeInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_SetTakeoffAltitudeRequest, Mavsdk_Rpc_Action_SetTakeoffAltitudeResponse>]

  /// - Returns: Interceptors to use when handling 'getMaximumSpeed'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeGetMaximumSpeedInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_GetMaximumSpeedRequest, Mavsdk_Rpc_Action_GetMaximumSpeedResponse>]

  /// - Returns: Interceptors to use when handling 'setMaximumSpeed'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeSetMaximumSpeedInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_SetMaximumSpeedRequest, Mavsdk_Rpc_Action_SetMaximumSpeedResponse>]

  /// - Returns: Interceptors to use when handling 'getReturnToLaunchAltitude'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeGetReturnToLaunchAltitudeInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_GetReturnToLaunchAltitudeResponse>]

  /// - Returns: Interceptors to use when handling 'setReturnToLaunchAltitude'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeSetReturnToLaunchAltitudeInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeRequest, Mavsdk_Rpc_Action_SetReturnToLaunchAltitudeResponse>]

  /// - Returns: Interceptors to use when handling 'setCurrentSpeed'.
  ///   Defaults to calling `self.makeInterceptors()`.
  func makeSetCurrentSpeedInterceptors() -> [ServerInterceptor<Mavsdk_Rpc_Action_SetCurrentSpeedRequest, Mavsdk_Rpc_Action_SetCurrentSpeedResponse>]
}
