/* THIS FILE IS AUTOGENERATED, DON'T EDIT! */

#pragma once
#include <{{ types_hpp }}>
#include <userver/chaotic/dynamic_config_variable_bundle.hpp>
#include <userver/dynamic_config/snapshot.hpp>

namespace taxi_config {

{% if generate_taxi_aliases %}
    // Legacy aliases for old utils/swaggen codegen compatibility
    namespace {{ name.lower() }} {
    {% for type_name, type in types.items() %}
        {% if type.need_dom_parser() and taxi_alias(type_name) != type.cpp_local_name() %}
            using {{ taxi_alias(type_name) }} = {{ type.cpp_local_name() }};
        {% endif %}
    {% endfor %}

    {% set type = types['taxi_config::' + name.lower() + '::VariableTypeRaw'] %}

    {% if type.cpp_user_name() != type.cpp_global_name() %}
        using VariableType = {{ type.cpp_user_name() }};
        using {{ camel_case(name) }} = {{ type.cpp_user_name() }};
    {% else %}
        using VariableType = VariableTypeRaw;
        using {{ camel_case(name) }} = VariableTypeRaw;
    {% endif %}

    {% for src, dst in aliases %}
        using {{ src }} = {{ dst }};
    {% endfor %}
    }

{% endif %}

extern const dynamic_config::Key<{{ cpp_user_type }}> {{ name }};

}
