#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};




// Corresponds to bcr_bot__srv__GetVisualTopics_Request

// This struct is not documented.
#[allow(missing_docs)]

#[allow(non_camel_case_types)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct GetVisualTopics_Request {

    // This member is not documented.
    #[allow(missing_docs)]
    pub refresh: bool,

}



impl Default for GetVisualTopics_Request {
  fn default() -> Self {
    <Self as rosidl_runtime_rs::Message>::from_rmw_message(super::srv::rmw::GetVisualTopics_Request::default())
  }
}

impl rosidl_runtime_rs::Message for GetVisualTopics_Request {
  type RmwMsg = super::srv::rmw::GetVisualTopics_Request;

  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
    match msg_cow {
      std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
        refresh: msg.refresh,
      }),
      std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
      refresh: msg.refresh,
      })
    }
  }

  fn from_rmw_message(msg: Self::RmwMsg) -> Self {
    Self {
      refresh: msg.refresh,
    }
  }
}


// Corresponds to bcr_bot__srv__GetVisualTopics_Response

// This struct is not documented.
#[allow(missing_docs)]

#[allow(non_camel_case_types)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct GetVisualTopics_Response {

    // This member is not documented.
    #[allow(missing_docs)]
    pub depth_image_topics: Vec<std::string::String>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub rgb_image_topics: Vec<std::string::String>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub camera_info_topics: Vec<std::string::String>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub point_cloud_topics: Vec<std::string::String>,

}



impl Default for GetVisualTopics_Response {
  fn default() -> Self {
    <Self as rosidl_runtime_rs::Message>::from_rmw_message(super::srv::rmw::GetVisualTopics_Response::default())
  }
}

impl rosidl_runtime_rs::Message for GetVisualTopics_Response {
  type RmwMsg = super::srv::rmw::GetVisualTopics_Response;

  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> {
    match msg_cow {
      std::borrow::Cow::Owned(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
        depth_image_topics: msg.depth_image_topics
          .into_iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        rgb_image_topics: msg.rgb_image_topics
          .into_iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        camera_info_topics: msg.camera_info_topics
          .into_iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        point_cloud_topics: msg.point_cloud_topics
          .into_iter()
          .map(|elem| elem.as_str().into())
          .collect(),
      }),
      std::borrow::Cow::Borrowed(msg) => std::borrow::Cow::Owned(Self::RmwMsg {
        depth_image_topics: msg.depth_image_topics
          .iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        rgb_image_topics: msg.rgb_image_topics
          .iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        camera_info_topics: msg.camera_info_topics
          .iter()
          .map(|elem| elem.as_str().into())
          .collect(),
        point_cloud_topics: msg.point_cloud_topics
          .iter()
          .map(|elem| elem.as_str().into())
          .collect(),
      })
    }
  }

  fn from_rmw_message(msg: Self::RmwMsg) -> Self {
    Self {
      depth_image_topics: msg.depth_image_topics
          .into_iter()
          .map(|elem| elem.to_string())
          .collect(),
      rgb_image_topics: msg.rgb_image_topics
          .into_iter()
          .map(|elem| elem.to_string())
          .collect(),
      camera_info_topics: msg.camera_info_topics
          .into_iter()
          .map(|elem| elem.to_string())
          .collect(),
      point_cloud_topics: msg.point_cloud_topics
          .into_iter()
          .map(|elem| elem.to_string())
          .collect(),
    }
  }
}






#[link(name = "bcr_bot__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_service_type_support_handle__bcr_bot__srv__GetVisualTopics() -> *const std::ffi::c_void;
}

// Corresponds to bcr_bot__srv__GetVisualTopics
#[allow(missing_docs, non_camel_case_types)]
pub struct GetVisualTopics;

impl rosidl_runtime_rs::Service for GetVisualTopics {
    type Request = GetVisualTopics_Request;
    type Response = GetVisualTopics_Response;

    fn get_type_support() -> *const std::ffi::c_void {
        // SAFETY: No preconditions for this function.
        unsafe { rosidl_typesupport_c__get_service_type_support_handle__bcr_bot__srv__GetVisualTopics() }
    }
}


