#pragma once

#include "requests.hpp"
#include "responses.hpp"

#include <userver/chaotic/openapi/client/command_control.hpp>

namespace {{ namespace }} {

class Client {
public:
{% for op in operations %}
  {% if op.client_generate %}
    /// {{ op.method }} {{ op.path }}
    {{ op.description | cpp_comment }}
    /// @throw {{ op.cpp_namespace() }}::Exception
    {% for response in op.responses %}
        {% if response.is_error() %}
          /// @throw {{ op.cpp_namespace() }}::Response{{ response.status }}
      {% endif %}
    {% endfor -%}
    virtual {{ op.cpp_namespace() }}::Response {{ op.cpp_method_name() }}(
      {%- if not op.empty_request() -%}
          const {{ op.cpp_namespace() }}::Request& request ,
      {%- endif %}
          const USERVER_NAMESPACE::chaotic::openapi::client::CommandControl& command_control = {}
    ) = 0;
  {% endif %}
{% endfor %}

  virtual ~Client();
};

}
