{#-
 # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 # Copyright (C) 2021  UAVCAN Development Team  <uavcan.org>
 # This software is distributed under the terms of the MIT License.
-#}
{%- extends "base.j2" %}
{%- block object -%}
{{ T | definition_begin }}
{

{% set composite_type = T.request_type %}{% include '_composite_type.j2' %}

{% set composite_type = T.response_type %}{% include '_composite_type.j2' %}

struct {{ 'Service_%s_%s' | format(T.version.major, T.version.minor) }} {
    static constexpr bool IsServiceType = true;
    static constexpr bool IsService = true;
    static constexpr bool IsRequest = false;
    static constexpr bool IsResponse = false;

    using Request = {{ T.request_type | short_reference_name }};
    using Response = {{ T.response_type | short_reference_name }};
};

}{{ T | definition_end }}
{%- endblock -%}
