/* This file has been automatically generated
   from the input file "methods-itl.conf". */

#include "config/configfragment.hpp"

namespace {

const char *fragment = R"CONFIG_FRAGMENT(// SPDX-FileCopyrightText: 2012 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-2.0-or-later

System.assert(Internal.run_with_activation_context(function() {
	template CheckCommand "icinga-check-command" use (IcingaCheck = Internal.IcingaCheck) {
		execute = IcingaCheck

		vars.icinga_min_version = ""
	}

	template CheckCommand "cluster-check-command" use (ClusterCheck = Internal.ClusterCheck) {
		execute = ClusterCheck
	}

	template CheckCommand "cluster-zone-check-command" use (ClusterZoneCheck = Internal.ClusterZoneCheck) {
		execute = ClusterZoneCheck
	}

	template CheckCommand "plugin-check-command" use (PluginCheck = Internal.PluginCheck) default {
		execute = PluginCheck
	}

	template NotificationCommand "plugin-notification-command" use (PluginNotification = Internal.PluginNotification) default {
		execute = PluginNotification
	}

	template EventCommand "plugin-event-command" use (PluginEvent = Internal.PluginEvent) default {
		execute = PluginEvent
	}

	template CheckCommand "dummy-check-command" use (DummyCheck = Internal.DummyCheck) {
		execute = DummyCheck
	}

	template CheckCommand "random-check-command" use (RandomCheck = Internal.RandomCheck) {
		execute = RandomCheck
	}

	template CheckCommand "exception-check-command" use (ExceptionCheck = Internal.ExceptionCheck) {
		execute = ExceptionCheck
	}

	template CheckCommand "null-check-command" use (NullCheck = Internal.NullCheck) {
		execute = NullCheck
	}

	template CheckCommand "ifw-api-check-command" use (IfwApiCheck = Internal.IfwApiCheck) {
		execute = IfwApiCheck
	}

	template EventCommand "null-event-command" use (NullEvent = Internal.NullEvent) {
		execute = NullEvent
	}

	template TimePeriod "empty-timeperiod" use (EmptyTimePeriod = Internal.EmptyTimePeriod) {
		update = EmptyTimePeriod
	}

	template TimePeriod "even-minutes-timeperiod" use (EvenMinutesTimePeriod = Internal.EvenMinutesTimePeriod) {
		update = EvenMinutesTimePeriod
	}

	template CheckCommand "sleep-check-command" use (SleepCheck = Internal.SleepCheck) {
	    execute = SleepCheck

	    vars.sleep_time = 1s
	}
}))

var methods = [
	"IcingaCheck",
	"IfwApiCheck",
	"ClusterCheck",
	"ClusterZoneCheck",
	"PluginCheck",
	"ClrCheck",
	"PluginNotification",
	"PluginEvent",
	"DummyCheck",
	"RandomCheck",
	"ExceptionCheck",
	"NullCheck",
	"NullEvent",
	"EmptyTimePeriod",
	"EvenMinutesTimePeriod",
	"SleepCheck"
]

for (method in methods) {
	Internal.remove(method)
}
)CONFIG_FRAGMENT";

REGISTER_CONFIG_FRAGMENT("methods-itl.conf", fragment);

}