// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from bcr_bot:srv/GetVisualTopics.idl
// generated code does not contain a copyright notice

#ifndef BCR_BOT__SRV__DETAIL__GET_VISUAL_TOPICS__TRAITS_HPP_
#define BCR_BOT__SRV__DETAIL__GET_VISUAL_TOPICS__TRAITS_HPP_

#include <stdint.h>

#include <sstream>
#include <string>
#include <type_traits>

#include "bcr_bot/srv/detail/get_visual_topics__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"

namespace bcr_bot
{

namespace srv
{

inline void to_flow_style_yaml(
  const GetVisualTopics_Request & msg,
  std::ostream & out)
{
  out << "{";
  // member: refresh
  {
    out << "refresh: ";
    rosidl_generator_traits::value_to_yaml(msg.refresh, out);
  }
  out << "}";
}  // NOLINT(readability/fn_size)

inline void to_block_style_yaml(
  const GetVisualTopics_Request & msg,
  std::ostream & out, size_t indentation = 0)
{
  // member: refresh
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "refresh: ";
    rosidl_generator_traits::value_to_yaml(msg.refresh, out);
    out << "\n";
  }
}  // NOLINT(readability/fn_size)

inline std::string to_yaml(const GetVisualTopics_Request & msg, bool use_flow_style = false)
{
  std::ostringstream out;
  if (use_flow_style) {
    to_flow_style_yaml(msg, out);
  } else {
    to_block_style_yaml(msg, out);
  }
  return out.str();
}

}  // namespace srv

}  // namespace bcr_bot

namespace rosidl_generator_traits
{

[[deprecated("use bcr_bot::srv::to_block_style_yaml() instead")]]
inline void to_yaml(
  const bcr_bot::srv::GetVisualTopics_Request & msg,
  std::ostream & out, size_t indentation = 0)
{
  bcr_bot::srv::to_block_style_yaml(msg, out, indentation);
}

[[deprecated("use bcr_bot::srv::to_yaml() instead")]]
inline std::string to_yaml(const bcr_bot::srv::GetVisualTopics_Request & msg)
{
  return bcr_bot::srv::to_yaml(msg);
}

template<>
inline const char * data_type<bcr_bot::srv::GetVisualTopics_Request>()
{
  return "bcr_bot::srv::GetVisualTopics_Request";
}

template<>
inline const char * name<bcr_bot::srv::GetVisualTopics_Request>()
{
  return "bcr_bot/srv/GetVisualTopics_Request";
}

template<>
struct has_fixed_size<bcr_bot::srv::GetVisualTopics_Request>
  : std::integral_constant<bool, true> {};

template<>
struct has_bounded_size<bcr_bot::srv::GetVisualTopics_Request>
  : std::integral_constant<bool, true> {};

template<>
struct is_message<bcr_bot::srv::GetVisualTopics_Request>
  : std::true_type {};

}  // namespace rosidl_generator_traits

namespace bcr_bot
{

namespace srv
{

inline void to_flow_style_yaml(
  const GetVisualTopics_Response & msg,
  std::ostream & out)
{
  out << "{";
  // member: depth_image_topics
  {
    if (msg.depth_image_topics.size() == 0) {
      out << "depth_image_topics: []";
    } else {
      out << "depth_image_topics: [";
      size_t pending_items = msg.depth_image_topics.size();
      for (auto item : msg.depth_image_topics) {
        rosidl_generator_traits::value_to_yaml(item, out);
        if (--pending_items > 0) {
          out << ", ";
        }
      }
      out << "]";
    }
    out << ", ";
  }

  // member: rgb_image_topics
  {
    if (msg.rgb_image_topics.size() == 0) {
      out << "rgb_image_topics: []";
    } else {
      out << "rgb_image_topics: [";
      size_t pending_items = msg.rgb_image_topics.size();
      for (auto item : msg.rgb_image_topics) {
        rosidl_generator_traits::value_to_yaml(item, out);
        if (--pending_items > 0) {
          out << ", ";
        }
      }
      out << "]";
    }
    out << ", ";
  }

  // member: camera_info_topics
  {
    if (msg.camera_info_topics.size() == 0) {
      out << "camera_info_topics: []";
    } else {
      out << "camera_info_topics: [";
      size_t pending_items = msg.camera_info_topics.size();
      for (auto item : msg.camera_info_topics) {
        rosidl_generator_traits::value_to_yaml(item, out);
        if (--pending_items > 0) {
          out << ", ";
        }
      }
      out << "]";
    }
    out << ", ";
  }

  // member: point_cloud_topics
  {
    if (msg.point_cloud_topics.size() == 0) {
      out << "point_cloud_topics: []";
    } else {
      out << "point_cloud_topics: [";
      size_t pending_items = msg.point_cloud_topics.size();
      for (auto item : msg.point_cloud_topics) {
        rosidl_generator_traits::value_to_yaml(item, out);
        if (--pending_items > 0) {
          out << ", ";
        }
      }
      out << "]";
    }
  }
  out << "}";
}  // NOLINT(readability/fn_size)

inline void to_block_style_yaml(
  const GetVisualTopics_Response & msg,
  std::ostream & out, size_t indentation = 0)
{
  // member: depth_image_topics
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    if (msg.depth_image_topics.size() == 0) {
      out << "depth_image_topics: []\n";
    } else {
      out << "depth_image_topics:\n";
      for (auto item : msg.depth_image_topics) {
        if (indentation > 0) {
          out << std::string(indentation, ' ');
        }
        out << "- ";
        rosidl_generator_traits::value_to_yaml(item, out);
        out << "\n";
      }
    }
  }

  // member: rgb_image_topics
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    if (msg.rgb_image_topics.size() == 0) {
      out << "rgb_image_topics: []\n";
    } else {
      out << "rgb_image_topics:\n";
      for (auto item : msg.rgb_image_topics) {
        if (indentation > 0) {
          out << std::string(indentation, ' ');
        }
        out << "- ";
        rosidl_generator_traits::value_to_yaml(item, out);
        out << "\n";
      }
    }
  }

  // member: camera_info_topics
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    if (msg.camera_info_topics.size() == 0) {
      out << "camera_info_topics: []\n";
    } else {
      out << "camera_info_topics:\n";
      for (auto item : msg.camera_info_topics) {
        if (indentation > 0) {
          out << std::string(indentation, ' ');
        }
        out << "- ";
        rosidl_generator_traits::value_to_yaml(item, out);
        out << "\n";
      }
    }
  }

  // member: point_cloud_topics
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    if (msg.point_cloud_topics.size() == 0) {
      out << "point_cloud_topics: []\n";
    } else {
      out << "point_cloud_topics:\n";
      for (auto item : msg.point_cloud_topics) {
        if (indentation > 0) {
          out << std::string(indentation, ' ');
        }
        out << "- ";
        rosidl_generator_traits::value_to_yaml(item, out);
        out << "\n";
      }
    }
  }
}  // NOLINT(readability/fn_size)

inline std::string to_yaml(const GetVisualTopics_Response & msg, bool use_flow_style = false)
{
  std::ostringstream out;
  if (use_flow_style) {
    to_flow_style_yaml(msg, out);
  } else {
    to_block_style_yaml(msg, out);
  }
  return out.str();
}

}  // namespace srv

}  // namespace bcr_bot

namespace rosidl_generator_traits
{

[[deprecated("use bcr_bot::srv::to_block_style_yaml() instead")]]
inline void to_yaml(
  const bcr_bot::srv::GetVisualTopics_Response & msg,
  std::ostream & out, size_t indentation = 0)
{
  bcr_bot::srv::to_block_style_yaml(msg, out, indentation);
}

[[deprecated("use bcr_bot::srv::to_yaml() instead")]]
inline std::string to_yaml(const bcr_bot::srv::GetVisualTopics_Response & msg)
{
  return bcr_bot::srv::to_yaml(msg);
}

template<>
inline const char * data_type<bcr_bot::srv::GetVisualTopics_Response>()
{
  return "bcr_bot::srv::GetVisualTopics_Response";
}

template<>
inline const char * name<bcr_bot::srv::GetVisualTopics_Response>()
{
  return "bcr_bot/srv/GetVisualTopics_Response";
}

template<>
struct has_fixed_size<bcr_bot::srv::GetVisualTopics_Response>
  : std::integral_constant<bool, false> {};

template<>
struct has_bounded_size<bcr_bot::srv::GetVisualTopics_Response>
  : std::integral_constant<bool, false> {};

template<>
struct is_message<bcr_bot::srv::GetVisualTopics_Response>
  : std::true_type {};

}  // namespace rosidl_generator_traits

namespace rosidl_generator_traits
{

template<>
inline const char * data_type<bcr_bot::srv::GetVisualTopics>()
{
  return "bcr_bot::srv::GetVisualTopics";
}

template<>
inline const char * name<bcr_bot::srv::GetVisualTopics>()
{
  return "bcr_bot/srv/GetVisualTopics";
}

template<>
struct has_fixed_size<bcr_bot::srv::GetVisualTopics>
  : std::integral_constant<
    bool,
    has_fixed_size<bcr_bot::srv::GetVisualTopics_Request>::value &&
    has_fixed_size<bcr_bot::srv::GetVisualTopics_Response>::value
  >
{
};

template<>
struct has_bounded_size<bcr_bot::srv::GetVisualTopics>
  : std::integral_constant<
    bool,
    has_bounded_size<bcr_bot::srv::GetVisualTopics_Request>::value &&
    has_bounded_size<bcr_bot::srv::GetVisualTopics_Response>::value
  >
{
};

template<>
struct is_service<bcr_bot::srv::GetVisualTopics>
  : std::true_type
{
};

template<>
struct is_service_request<bcr_bot::srv::GetVisualTopics_Request>
  : std::true_type
{
};

template<>
struct is_service_response<bcr_bot::srv::GetVisualTopics_Response>
  : std::true_type
{
};

}  // namespace rosidl_generator_traits

#endif  // BCR_BOT__SRV__DETAIL__GET_VISUAL_TOPICS__TRAITS_HPP_
