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

#ifndef CPP_PROCOCOL__SRV__DETAIL__POSITION__TRAITS_HPP_
#define CPP_PROCOCOL__SRV__DETAIL__POSITION__TRAITS_HPP_

#include <stdint.h>

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

#include "cpp_prococol/srv/detail/position__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"

namespace cpp_prococol
{

namespace srv
{

inline void to_flow_style_yaml(
  const Position_Request & msg,
  std::ostream & out)
{
  out << "{";
  // member: target_x
  {
    out << "target_x: ";
    rosidl_generator_traits::value_to_yaml(msg.target_x, out);
    out << ", ";
  }

  // member: target_y
  {
    out << "target_y: ";
    rosidl_generator_traits::value_to_yaml(msg.target_y, out);
  }
  out << "}";
}  // NOLINT(readability/fn_size)

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

  // member: target_y
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "target_y: ";
    rosidl_generator_traits::value_to_yaml(msg.target_y, out);
    out << "\n";
  }
}  // NOLINT(readability/fn_size)

inline std::string to_yaml(const Position_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 cpp_prococol

namespace rosidl_generator_traits
{

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

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

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

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

template<>
struct has_fixed_size<cpp_prococol::srv::Position_Request>
  : std::integral_constant<bool, true> {};

template<>
struct has_bounded_size<cpp_prococol::srv::Position_Request>
  : std::integral_constant<bool, true> {};

template<>
struct is_message<cpp_prococol::srv::Position_Request>
  : std::true_type {};

}  // namespace rosidl_generator_traits

namespace cpp_prococol
{

namespace srv
{

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

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

inline std::string to_yaml(const Position_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 cpp_prococol

namespace rosidl_generator_traits
{

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

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

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

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

template<>
struct has_fixed_size<cpp_prococol::srv::Position_Response>
  : std::integral_constant<bool, true> {};

template<>
struct has_bounded_size<cpp_prococol::srv::Position_Response>
  : std::integral_constant<bool, true> {};

template<>
struct is_message<cpp_prococol::srv::Position_Response>
  : std::true_type {};

}  // namespace rosidl_generator_traits

namespace rosidl_generator_traits
{

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

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

template<>
struct has_fixed_size<cpp_prococol::srv::Position>
  : std::integral_constant<
    bool,
    has_fixed_size<cpp_prococol::srv::Position_Request>::value &&
    has_fixed_size<cpp_prococol::srv::Position_Response>::value
  >
{
};

template<>
struct has_bounded_size<cpp_prococol::srv::Position>
  : std::integral_constant<
    bool,
    has_bounded_size<cpp_prococol::srv::Position_Request>::value &&
    has_bounded_size<cpp_prococol::srv::Position_Response>::value
  >
{
};

template<>
struct is_service<cpp_prococol::srv::Position>
  : std::true_type
{
};

template<>
struct is_service_request<cpp_prococol::srv::Position_Request>
  : std::true_type
{
};

template<>
struct is_service_response<cpp_prococol::srv::Position_Response>
  : std::true_type
{
};

}  // namespace rosidl_generator_traits

#endif  // CPP_PROCOCOL__SRV__DETAIL__POSITION__TRAITS_HPP_
