#include "base/exception.hpp"
#include "base/objectlock.hpp"
#include "base/utility.hpp"
#include "base/convert.hpp"
#include "base/debug.hpp"
#include "base/dependencygraph.hpp"
#include "base/logger.hpp"
#include "base/function.hpp"
#include "base/configobject.hpp"
#include "base/configtype.hpp"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace icinga
{

TypeImpl<OTLPMetricsWriter>::TypeImpl()
{ }

TypeImpl<OTLPMetricsWriter>::~TypeImpl()
{ }

String TypeImpl<OTLPMetricsWriter>::GetName() const
{
	return "OTLPMetricsWriter";
}

int TypeImpl<OTLPMetricsWriter>::GetAttributes() const
{
	return 0;
}

Type::Ptr TypeImpl<OTLPMetricsWriter>::GetBaseType() const
{
	return ConfigObject::TypeInstance;
}

int TypeImpl<OTLPMetricsWriter>::GetFieldId(const String& name) const
{
	int offset = ConfigObject::TypeInstance->GetFieldCount();

	switch (static_cast<int>(Utility::SDBM(name, 6))) {
		case -1966507152:
			if (name == "metrics_endpoint")
				return offset + 1;

			break;
		case -1844041471:
			if (name == "port")
				return offset + 9;

			break;
		case -1785555173:
			if (name == "host_resource_attributes")
				return offset + 7;

			break;
		case -1660431244:
			if (name == "disconnect_timeout")
				return offset + 10;

			break;
		case -1262592144:
			if (name == "service_namespace")
				return offset + 2;
			if (name == "service_resource_attributes")
				return offset + 8;

			break;
		case -1059695869:
			if (name == "enable_ha")
				return offset + 12;
			if (name == "enable_send_thresholds")
				return offset + 13;
			if (name == "enable_tls")
				return offset + 14;

			break;
		case -913390494:
			if (name == "tls_ca_file")
				return offset + 5;

			break;
		case -913390490:
			if (name == "tls_cert_file")
				return offset + 4;

			break;
		case -912996887:
			if (name == "tls_insecure_noverify")
				return offset + 15;

			break;
		case -912865698:
			if (name == "tls_key_file")
				return offset + 3;

			break;
		case -99791941:
			if (name == "flush_interval")
				return offset + 11;
			if (name == "flush_threshold")
				return offset + 16;

			break;
		case 501261128:
			if (name == "host")
				return offset + 0;

			break;
		case 1412723697:
			if (name == "basic_auth")
				return offset + 6;

			break;
	}

	return ConfigObject::TypeInstance->GetFieldId(name);
}

Field TypeImpl<OTLPMetricsWriter>::GetFieldInfo(int id) const
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount();
	if (real_id < 0) { return ConfigObject::TypeInstance->GetFieldInfo(id); }
	switch (real_id) {
		case 0:
			return {0, "String", "host", "host", nullptr, 1282, 0};
		case 1:
			return {1, "String", "metrics_endpoint", "metrics_endpoint", nullptr, 1282, 0};
		case 2:
			return {2, "String", "service_namespace", "service_namespace", nullptr, 258, 0};
		case 3:
			return {3, "String", "tls_key_file", "tls_key_file", nullptr, 1026, 0};
		case 4:
			return {4, "String", "tls_cert_file", "tls_cert_file", nullptr, 1026, 0};
		case 5:
			return {5, "String", "tls_ca_file", "tls_ca_file", nullptr, 1026, 0};
		case 6:
			return {6, "Dictionary", "basic_auth", "basic_auth", nullptr, 3074, 0};
		case 7:
			return {7, "Dictionary", "host_resource_attributes", "host_resource_attributes", nullptr, 2, 0};
		case 8:
			return {8, "Dictionary", "service_resource_attributes", "service_resource_attributes", nullptr, 2, 0};
		case 9:
			return {9, "Number", "port", "port", nullptr, 1026, 0};
		case 10:
			return {10, "Number", "disconnect_timeout", "disconnect_timeout", nullptr, 2, 0};
		case 11:
			return {11, "Number", "flush_interval", "flush_interval", nullptr, 2, 0};
		case 12:
			return {12, "Boolean", "enable_ha", "enable_ha", nullptr, 2, 0};
		case 13:
			return {13, "Boolean", "enable_send_thresholds", "enable_send_thresholds", nullptr, 2, 0};
		case 14:
			return {14, "Boolean", "enable_tls", "enable_tls", nullptr, 1026, 0};
		case 15:
			return {15, "Boolean", "tls_insecure_noverify", "tls_insecure_noverify", nullptr, 1026, 0};
		case 16:
			return {16, "Number", "flush_threshold", "flush_threshold", nullptr, 2, 0};
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

int TypeImpl<OTLPMetricsWriter>::GetFieldCount() const
{
	return 17 + ConfigObject::TypeInstance->GetFieldCount();
}

ObjectFactory TypeImpl<OTLPMetricsWriter>::GetFactory() const
{
	return TypeHelper<OTLPMetricsWriter, false>::GetFactory();
}

int TypeImpl<OTLPMetricsWriter>::GetActivationPriority() const
{
	return 100;
}

void TypeImpl<OTLPMetricsWriter>::RegisterAttributeHandler(int fieldId, const Type::AttributeHandler& callback)
{
	int real_id = fieldId - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { ConfigObject::TypeInstance->RegisterAttributeHandler(fieldId, callback); return; }
	switch (real_id) {
		case 0:
			ObjectImpl<OTLPMetricsWriter>::OnHostChanged.connect(callback);
			break;
		case 1:
			ObjectImpl<OTLPMetricsWriter>::OnMetricsEndpointChanged.connect(callback);
			break;
		case 2:
			ObjectImpl<OTLPMetricsWriter>::OnServiceNamespaceChanged.connect(callback);
			break;
		case 3:
			ObjectImpl<OTLPMetricsWriter>::OnTlsKeyFileChanged.connect(callback);
			break;
		case 4:
			ObjectImpl<OTLPMetricsWriter>::OnTlsCertFileChanged.connect(callback);
			break;
		case 5:
			ObjectImpl<OTLPMetricsWriter>::OnTlsCaFileChanged.connect(callback);
			break;
		case 6:
			ObjectImpl<OTLPMetricsWriter>::OnBasicAuthChanged.connect(callback);
			break;
		case 7:
			ObjectImpl<OTLPMetricsWriter>::OnHostResourceAttributesChanged.connect(callback);
			break;
		case 8:
			ObjectImpl<OTLPMetricsWriter>::OnServiceResourceAttributesChanged.connect(callback);
			break;
		case 9:
			ObjectImpl<OTLPMetricsWriter>::OnPortChanged.connect(callback);
			break;
		case 10:
			ObjectImpl<OTLPMetricsWriter>::OnDisconnectTimeoutChanged.connect(callback);
			break;
		case 11:
			ObjectImpl<OTLPMetricsWriter>::OnFlushIntervalChanged.connect(callback);
			break;
		case 12:
			ObjectImpl<OTLPMetricsWriter>::OnEnableHaChanged.connect(callback);
			break;
		case 13:
			ObjectImpl<OTLPMetricsWriter>::OnEnableSendThresholdsChanged.connect(callback);
			break;
		case 14:
			ObjectImpl<OTLPMetricsWriter>::OnEnableTlsChanged.connect(callback);
			break;
		case 15:
			ObjectImpl<OTLPMetricsWriter>::OnTlsInsecureNoverifyChanged.connect(callback);
			break;
		case 16:
			ObjectImpl<OTLPMetricsWriter>::OnFlushThresholdChanged.connect(callback);
			break;
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

void ObjectImpl<OTLPMetricsWriter>::Validate(int types, const ValidationUtils& utils)
{
	ConfigObject::Validate(types, utils);

	if (2 & types)
		ValidateHost(Lazy<String>([this]() { return GetHost(); }), utils);
	if (2 & types)
		ValidateMetricsEndpoint(Lazy<String>([this]() { return GetMetricsEndpoint(); }), utils);
	if (2 & types)
		ValidateServiceNamespace(Lazy<String>([this]() { return GetServiceNamespace(); }), utils);
	if (2 & types)
		ValidateTlsKeyFile(Lazy<String>([this]() { return GetTlsKeyFile(); }), utils);
	if (2 & types)
		ValidateTlsCertFile(Lazy<String>([this]() { return GetTlsCertFile(); }), utils);
	if (2 & types)
		ValidateTlsCaFile(Lazy<String>([this]() { return GetTlsCaFile(); }), utils);
	if (2 & types)
		ValidateBasicAuth(Lazy<Dictionary::Ptr>([this]() { return GetBasicAuth(); }), utils);
	if (2 & types)
		ValidateHostResourceAttributes(Lazy<Dictionary::Ptr>([this]() { return GetHostResourceAttributes(); }), utils);
	if (2 & types)
		ValidateServiceResourceAttributes(Lazy<Dictionary::Ptr>([this]() { return GetServiceResourceAttributes(); }), utils);
	if (2 & types)
		ValidatePort(Lazy<int>([this]() { return GetPort(); }), utils);
	if (2 & types)
		ValidateDisconnectTimeout(Lazy<int>([this]() { return GetDisconnectTimeout(); }), utils);
	if (2 & types)
		ValidateFlushInterval(Lazy<int>([this]() { return GetFlushInterval(); }), utils);
	if (2 & types)
		ValidateEnableHa(Lazy<bool>([this]() { return GetEnableHa(); }), utils);
	if (2 & types)
		ValidateEnableSendThresholds(Lazy<bool>([this]() { return GetEnableSendThresholds(); }), utils);
	if (2 & types)
		ValidateEnableTls(Lazy<bool>([this]() { return GetEnableTls(); }), utils);
	if (2 & types)
		ValidateTlsInsecureNoverify(Lazy<bool>([this]() { return GetTlsInsecureNoverify(); }), utils);
	if (2 & types)
		ValidateFlushThreshold(Lazy<int64_t>([this]() { return GetFlushThreshold(); }), utils);
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateHost(const Lazy<String>& value, const ValidationUtils& utils)
{
	if (value().IsEmpty())
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_cast<ConfigObject *>(this), { "host" }, "Attribute must not be empty."));

}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateMetricsEndpoint(const Lazy<String>& value, const ValidationUtils& utils)
{
	if (value().IsEmpty())
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_cast<ConfigObject *>(this), { "metrics_endpoint" }, "Attribute must not be empty."));

}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateServiceNamespace(const Lazy<String>& value, const ValidationUtils& utils)
{
	if (value().IsEmpty())
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_cast<ConfigObject *>(this), { "service_namespace" }, "Attribute must not be empty."));

}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateTlsKeyFile(const Lazy<String>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateTlsCertFile(const Lazy<String>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateTlsCaFile(const Lazy<String>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateBasicAuth(const Lazy<Dictionary::Ptr>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateHostResourceAttributes(const Lazy<Dictionary::Ptr>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateServiceResourceAttributes(const Lazy<Dictionary::Ptr>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidatePort(const Lazy<int>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateDisconnectTimeout(const Lazy<int>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateFlushInterval(const Lazy<int>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateEnableHa(const Lazy<bool>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateEnableSendThresholds(const Lazy<bool>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateEnableTls(const Lazy<bool>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateTlsInsecureNoverify(const Lazy<bool>& value, const ValidationUtils& utils)
{
}

void ObjectImpl<OTLPMetricsWriter>::SimpleValidateFlushThreshold(const Lazy<int64_t>& value, const ValidationUtils& utils)
{
}

ObjectImpl<OTLPMetricsWriter>::ObjectImpl()
{
	SetHost(GetDefaultHost(), true);
	SetMetricsEndpoint(GetDefaultMetricsEndpoint(), true);
	SetServiceNamespace(GetDefaultServiceNamespace(), true);
	SetTlsKeyFile(GetDefaultTlsKeyFile(), true);
	SetTlsCertFile(GetDefaultTlsCertFile(), true);
	SetTlsCaFile(GetDefaultTlsCaFile(), true);
	SetBasicAuth(GetDefaultBasicAuth(), true);
	SetHostResourceAttributes(GetDefaultHostResourceAttributes(), true);
	SetServiceResourceAttributes(GetDefaultServiceResourceAttributes(), true);
	SetPort(GetDefaultPort(), true);
	SetDisconnectTimeout(GetDefaultDisconnectTimeout(), true);
	SetFlushInterval(GetDefaultFlushInterval(), true);
	SetEnableHa(GetDefaultEnableHa(), true);
	SetEnableSendThresholds(GetDefaultEnableSendThresholds(), true);
	SetEnableTls(GetDefaultEnableTls(), true);
	SetTlsInsecureNoverify(GetDefaultTlsInsecureNoverify(), true);
	SetFlushThreshold(GetDefaultFlushThreshold(), true);
}

ObjectImpl<OTLPMetricsWriter>::~ObjectImpl()
{ }

void ObjectImpl<OTLPMetricsWriter>::SetField(int id, const Value& value, bool suppress_events, const Value& cookie)
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { ConfigObject::SetField(id, value, suppress_events, cookie); return; }
	switch (real_id) {
		case 0:
			SetHost(value, suppress_events, cookie);
			break;
		case 1:
			SetMetricsEndpoint(value, suppress_events, cookie);
			break;
		case 2:
			SetServiceNamespace(value, suppress_events, cookie);
			break;
		case 3:
			SetTlsKeyFile(value, suppress_events, cookie);
			break;
		case 4:
			SetTlsCertFile(value, suppress_events, cookie);
			break;
		case 5:
			SetTlsCaFile(value, suppress_events, cookie);
			break;
		case 6:
			SetBasicAuth(value, suppress_events, cookie);
			break;
		case 7:
			SetHostResourceAttributes(value, suppress_events, cookie);
			break;
		case 8:
			SetServiceResourceAttributes(value, suppress_events, cookie);
			break;
		case 9:
			SetPort(value, suppress_events, cookie);
			break;
		case 10:
			SetDisconnectTimeout(value, suppress_events, cookie);
			break;
		case 11:
			SetFlushInterval(value, suppress_events, cookie);
			break;
		case 12:
			SetEnableHa(value, suppress_events, cookie);
			break;
		case 13:
			SetEnableSendThresholds(value, suppress_events, cookie);
			break;
		case 14:
			SetEnableTls(value, suppress_events, cookie);
			break;
		case 15:
			SetTlsInsecureNoverify(value, suppress_events, cookie);
			break;
		case 16:
			SetFlushThreshold(value, suppress_events, cookie);
			break;
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

Value ObjectImpl<OTLPMetricsWriter>::GetField(int id) const
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { return ConfigObject::GetField(id); }
	switch (real_id) {
		case 0:
			return GetHost();
		case 1:
			return GetMetricsEndpoint();
		case 2:
			return GetServiceNamespace();
		case 3:
			return GetTlsKeyFile();
		case 4:
			return GetTlsCertFile();
		case 5:
			return GetTlsCaFile();
		case 6:
			return GetBasicAuth();
		case 7:
			return GetHostResourceAttributes();
		case 8:
			return GetServiceResourceAttributes();
		case 9:
			return GetPort();
		case 10:
			return GetDisconnectTimeout();
		case 11:
			return GetFlushInterval();
		case 12:
			return GetEnableHa();
		case 13:
			return GetEnableSendThresholds();
		case 14:
			return GetEnableTls();
		case 15:
			return GetTlsInsecureNoverify();
		case 16:
			return GetFlushThreshold();
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

void ObjectImpl<OTLPMetricsWriter>::ValidateField(int id, const Lazy<Value>& lvalue, const ValidationUtils& utils)
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { ConfigObject::ValidateField(id, lvalue, utils); return; }
	switch (real_id) {
		case 0:
			ValidateHost(lvalue, utils);
			break;
		case 1:
			ValidateMetricsEndpoint(lvalue, utils);
			break;
		case 2:
			ValidateServiceNamespace(lvalue, utils);
			break;
		case 3:
			ValidateTlsKeyFile(lvalue, utils);
			break;
		case 4:
			ValidateTlsCertFile(lvalue, utils);
			break;
		case 5:
			ValidateTlsCaFile(lvalue, utils);
			break;
		case 6:
			ValidateBasicAuth(lvalue, utils);
			break;
		case 7:
			ValidateHostResourceAttributes(lvalue, utils);
			break;
		case 8:
			ValidateServiceResourceAttributes(lvalue, utils);
			break;
		case 9:
			ValidatePort(lvalue, utils);
			break;
		case 10:
			ValidateDisconnectTimeout(lvalue, utils);
			break;
		case 11:
			ValidateFlushInterval(lvalue, utils);
			break;
		case 12:
			ValidateEnableHa(lvalue, utils);
			break;
		case 13:
			ValidateEnableSendThresholds(lvalue, utils);
			break;
		case 14:
			ValidateEnableTls(lvalue, utils);
			break;
		case 15:
			ValidateTlsInsecureNoverify(lvalue, utils);
			break;
		case 16:
			ValidateFlushThreshold(lvalue, utils);
			break;
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

void ObjectImpl<OTLPMetricsWriter>::NotifyField(int id, const Value& cookie)
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { ConfigObject::NotifyField(id, cookie); return; }
	switch (real_id) {
		case 0:
			NotifyHost(cookie);
			break;
		case 1:
			NotifyMetricsEndpoint(cookie);
			break;
		case 2:
			NotifyServiceNamespace(cookie);
			break;
		case 3:
			NotifyTlsKeyFile(cookie);
			break;
		case 4:
			NotifyTlsCertFile(cookie);
			break;
		case 5:
			NotifyTlsCaFile(cookie);
			break;
		case 6:
			NotifyBasicAuth(cookie);
			break;
		case 7:
			NotifyHostResourceAttributes(cookie);
			break;
		case 8:
			NotifyServiceResourceAttributes(cookie);
			break;
		case 9:
			NotifyPort(cookie);
			break;
		case 10:
			NotifyDisconnectTimeout(cookie);
			break;
		case 11:
			NotifyFlushInterval(cookie);
			break;
		case 12:
			NotifyEnableHa(cookie);
			break;
		case 13:
			NotifyEnableSendThresholds(cookie);
			break;
		case 14:
			NotifyEnableTls(cookie);
			break;
		case 15:
			NotifyTlsInsecureNoverify(cookie);
			break;
		case 16:
			NotifyFlushThreshold(cookie);
			break;
		default:
			throw std::runtime_error("Invalid field ID.");
	}
}

Object::Ptr ObjectImpl<OTLPMetricsWriter>::NavigateField(int id) const
{
	int real_id = id - ConfigObject::TypeInstance->GetFieldCount(); 
	if (real_id < 0) { return ConfigObject::NavigateField(id); }
	throw std::runtime_error("Invalid field ID.");
}

String ObjectImpl<OTLPMetricsWriter>::GetHost() const
{
	return m_Host.load();
}

String ObjectImpl<OTLPMetricsWriter>::GetMetricsEndpoint() const
{
	return m_MetricsEndpoint.load();
}

String ObjectImpl<OTLPMetricsWriter>::GetServiceNamespace() const
{
	return m_ServiceNamespace.load();
}

String ObjectImpl<OTLPMetricsWriter>::GetTlsKeyFile() const
{
	return m_TlsKeyFile.load();
}

String ObjectImpl<OTLPMetricsWriter>::GetTlsCertFile() const
{
	return m_TlsCertFile.load();
}

String ObjectImpl<OTLPMetricsWriter>::GetTlsCaFile() const
{
	return m_TlsCaFile.load();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetBasicAuth() const
{
	return m_BasicAuth.load();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetHostResourceAttributes() const
{
	return m_HostResourceAttributes.load();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetServiceResourceAttributes() const
{
	return m_ServiceResourceAttributes.load();
}

int ObjectImpl<OTLPMetricsWriter>::GetPort() const
{
	return m_Port.load();
}

int ObjectImpl<OTLPMetricsWriter>::GetDisconnectTimeout() const
{
	return m_DisconnectTimeout.load();
}

int ObjectImpl<OTLPMetricsWriter>::GetFlushInterval() const
{
	return m_FlushInterval.load();
}

bool ObjectImpl<OTLPMetricsWriter>::GetEnableHa() const
{
	return m_EnableHa.load();
}

bool ObjectImpl<OTLPMetricsWriter>::GetEnableSendThresholds() const
{
	return m_EnableSendThresholds.load();
}

bool ObjectImpl<OTLPMetricsWriter>::GetEnableTls() const
{
	return m_EnableTls.load();
}

bool ObjectImpl<OTLPMetricsWriter>::GetTlsInsecureNoverify() const
{
	return m_TlsInsecureNoverify.load();
}

int64_t ObjectImpl<OTLPMetricsWriter>::GetFlushThreshold() const
{
	return m_FlushThreshold.load();
}

void ObjectImpl<OTLPMetricsWriter>::SetHost(const String& value, bool suppress_events, const Value& cookie)
{
	m_Host.store(value);
	if (!suppress_events) {
		NotifyHost(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetMetricsEndpoint(const String& value, bool suppress_events, const Value& cookie)
{
	m_MetricsEndpoint.store(value);
	if (!suppress_events) {
		NotifyMetricsEndpoint(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetServiceNamespace(const String& value, bool suppress_events, const Value& cookie)
{
	m_ServiceNamespace.store(value);
	if (!suppress_events) {
		NotifyServiceNamespace(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetTlsKeyFile(const String& value, bool suppress_events, const Value& cookie)
{
	m_TlsKeyFile.store(value);
	if (!suppress_events) {
		NotifyTlsKeyFile(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetTlsCertFile(const String& value, bool suppress_events, const Value& cookie)
{
	m_TlsCertFile.store(value);
	if (!suppress_events) {
		NotifyTlsCertFile(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetTlsCaFile(const String& value, bool suppress_events, const Value& cookie)
{
	m_TlsCaFile.store(value);
	if (!suppress_events) {
		NotifyTlsCaFile(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetBasicAuth(const Dictionary::Ptr& value, bool suppress_events, const Value& cookie)
{
	m_BasicAuth.store(value);
	if (!suppress_events) {
		NotifyBasicAuth(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetHostResourceAttributes(const Dictionary::Ptr& value, bool suppress_events, const Value& cookie)
{
	m_HostResourceAttributes.store(value);
	if (!suppress_events) {
		NotifyHostResourceAttributes(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetServiceResourceAttributes(const Dictionary::Ptr& value, bool suppress_events, const Value& cookie)
{
	m_ServiceResourceAttributes.store(value);
	if (!suppress_events) {
		NotifyServiceResourceAttributes(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetPort(int value, bool suppress_events, const Value& cookie)
{
	m_Port.store(value);
	if (!suppress_events) {
		NotifyPort(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetDisconnectTimeout(int value, bool suppress_events, const Value& cookie)
{
	m_DisconnectTimeout.store(value);
	if (!suppress_events) {
		NotifyDisconnectTimeout(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetFlushInterval(int value, bool suppress_events, const Value& cookie)
{
	m_FlushInterval.store(value);
	if (!suppress_events) {
		NotifyFlushInterval(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetEnableHa(bool value, bool suppress_events, const Value& cookie)
{
	m_EnableHa.store(value);
	if (!suppress_events) {
		NotifyEnableHa(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetEnableSendThresholds(bool value, bool suppress_events, const Value& cookie)
{
	m_EnableSendThresholds.store(value);
	if (!suppress_events) {
		NotifyEnableSendThresholds(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetEnableTls(bool value, bool suppress_events, const Value& cookie)
{
	m_EnableTls.store(value);
	if (!suppress_events) {
		NotifyEnableTls(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetTlsInsecureNoverify(bool value, bool suppress_events, const Value& cookie)
{
	m_TlsInsecureNoverify.store(value);
	if (!suppress_events) {
		NotifyTlsInsecureNoverify(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::SetFlushThreshold(const int64_t& value, bool suppress_events, const Value& cookie)
{
	m_FlushThreshold.store(value);
	if (!suppress_events) {
		NotifyFlushThreshold(cookie);
	}

}

void ObjectImpl<OTLPMetricsWriter>::NotifyHost(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnHostChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyMetricsEndpoint(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnMetricsEndpointChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyServiceNamespace(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnServiceNamespaceChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyTlsKeyFile(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnTlsKeyFileChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyTlsCertFile(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnTlsCertFileChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyTlsCaFile(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnTlsCaFileChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyBasicAuth(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnBasicAuthChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyHostResourceAttributes(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnHostResourceAttributesChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyServiceResourceAttributes(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnServiceResourceAttributesChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyPort(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnPortChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyDisconnectTimeout(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnDisconnectTimeoutChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyFlushInterval(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnFlushIntervalChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyEnableHa(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnEnableHaChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyEnableSendThresholds(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnEnableSendThresholdsChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyEnableTls(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnEnableTlsChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyTlsInsecureNoverify(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnTlsInsecureNoverifyChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

void ObjectImpl<OTLPMetricsWriter>::NotifyFlushThreshold(const Value& cookie)
{
	auto *dobj = dynamic_cast<ConfigObject *>(this);
	if (!dobj || dobj->IsActive())
		OnFlushThresholdChanged(static_cast<OTLPMetricsWriter *>(this), cookie);
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultHost() const
{
	 return "127.0.0.1"; 
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultMetricsEndpoint() const
{
	 return "/v1/metrics"; 
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultServiceNamespace() const
{
	 return "icinga"; 
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultTlsKeyFile() const
{
	return String();
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultTlsCertFile() const
{
	return String();
}

String ObjectImpl<OTLPMetricsWriter>::GetDefaultTlsCaFile() const
{
	return String();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetDefaultBasicAuth() const
{
	return Dictionary::Ptr();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetDefaultHostResourceAttributes() const
{
	return Dictionary::Ptr();
}

Dictionary::Ptr ObjectImpl<OTLPMetricsWriter>::GetDefaultServiceResourceAttributes() const
{
	return Dictionary::Ptr();
}

int ObjectImpl<OTLPMetricsWriter>::GetDefaultPort() const
{
	 return 4318; 
}

int ObjectImpl<OTLPMetricsWriter>::GetDefaultDisconnectTimeout() const
{
	 return 10; 
}

int ObjectImpl<OTLPMetricsWriter>::GetDefaultFlushInterval() const
{
	 return 15; 
}

bool ObjectImpl<OTLPMetricsWriter>::GetDefaultEnableHa() const
{
	 return true; 
}

bool ObjectImpl<OTLPMetricsWriter>::GetDefaultEnableSendThresholds() const
{
	 return false; 
}

bool ObjectImpl<OTLPMetricsWriter>::GetDefaultEnableTls() const
{
	 return false; 
}

bool ObjectImpl<OTLPMetricsWriter>::GetDefaultTlsInsecureNoverify() const
{
	 return false; 
}

int64_t ObjectImpl<OTLPMetricsWriter>::GetDefaultFlushThreshold() const
{
	 return 16 * 1024 * 1024; 
}


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnHostChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnMetricsEndpointChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnServiceNamespaceChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnTlsKeyFileChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnTlsCertFileChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnTlsCaFileChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnBasicAuthChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnHostResourceAttributesChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnServiceResourceAttributesChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnPortChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnDisconnectTimeoutChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnFlushIntervalChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnEnableHaChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnEnableSendThresholdsChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnEnableTlsChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnTlsInsecureNoverifyChanged;


boost::signals2::signal<void (const intrusive_ptr<OTLPMetricsWriter>&, const Value&)> ObjectImpl<OTLPMetricsWriter>::OnFlushThresholdChanged;

static void TIValidateOTLPMetricsWriter_1(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& key, const Value& value, std::vector<String>& location, const ValidationUtils& utils)
{
	bool known_attribute = false;
	do {
		if (key != "username")
			break;
		known_attribute = true;
		if (value.IsEmpty() || value.IsScalar())
			return;
	} while (0);

	do {
		if (key != "password")
			break;
		known_attribute = true;
		if (value.IsEmpty() || value.IsScalar())
			return;
	} while (0);

	if (!known_attribute)
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid attribute: " + key));
	else
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid type."));
}

static void TIValidateOTLPMetricsWriter_2(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& key, const Value& value, std::vector<String>& location, const ValidationUtils& utils)
{
	bool known_attribute = false;
	do {
		known_attribute = true;
		if (value.IsEmpty() || value.IsScalar())
			return;
	} while (0);

	if (!known_attribute)
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid attribute: " + key));
	else
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid type."));
}

static void TIValidateOTLPMetricsWriter_3(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& key, const Value& value, std::vector<String>& location, const ValidationUtils& utils)
{
	bool known_attribute = false;
	do {
		known_attribute = true;
		if (value.IsEmpty() || value.IsScalar())
			return;
	} while (0);

	if (!known_attribute)
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid attribute: " + key));
	else
		BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Invalid type."));
}

static void TIValidateOTLPMetricsWriterBasicAuth(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const Dictionary::Ptr& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

	do {
		const Dictionary::Ptr& dict = value;
		{
			ObjectLock olock(dict);
			for (const Dictionary::Pair& kv : dict) {
				const String& akey = kv.first;
				const Value& avalue = kv.second;
				location.emplace_back(akey);
				TIValidateOTLPMetricsWriter_1(object, akey, avalue, location, utils);
				location.pop_back();
			}
		}
		if (dict->Get("username").IsEmpty())
			BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Required dictionary item 'username' is not set."));
		if (dict->Get("password").IsEmpty())
			BOOST_THROW_EXCEPTION(ValidationError(dynamic_pointer_cast<ConfigObject>(object), location, "Required dictionary item 'password' is not set."));
		return;
	} while (0);

}

static void TIValidateOTLPMetricsWriterDisconnectTimeout(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, int value, std::vector<String>& location, const ValidationUtils& utils)
{
}

static void TIValidateOTLPMetricsWriterEnableHa(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, bool value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

}

static void TIValidateOTLPMetricsWriterEnableSendThresholds(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, bool value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

}

static void TIValidateOTLPMetricsWriterEnableTls(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, bool value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

}

static void TIValidateOTLPMetricsWriterFlushInterval(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, int value, std::vector<String>& location, const ValidationUtils& utils)
{
}

static void TIValidateOTLPMetricsWriterFlushThreshold(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const int64_t& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

}

static void TIValidateOTLPMetricsWriterHost(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

static void TIValidateOTLPMetricsWriterHostResourceAttributes(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const Dictionary::Ptr& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

	do {
		const Dictionary::Ptr& dict = value;
		{
			ObjectLock olock(dict);
			for (const Dictionary::Pair& kv : dict) {
				const String& akey = kv.first;
				const Value& avalue = kv.second;
				location.emplace_back(akey);
				TIValidateOTLPMetricsWriter_2(object, akey, avalue, location, utils);
				location.pop_back();
			}
		}
		return;
	} while (0);

}

static void TIValidateOTLPMetricsWriterMetricsEndpoint(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

static void TIValidateOTLPMetricsWriterPort(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, int value, std::vector<String>& location, const ValidationUtils& utils)
{
}

static void TIValidateOTLPMetricsWriterServiceNamespace(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

static void TIValidateOTLPMetricsWriterServiceResourceAttributes(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const Dictionary::Ptr& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

	do {
		const Dictionary::Ptr& dict = value;
		{
			ObjectLock olock(dict);
			for (const Dictionary::Pair& kv : dict) {
				const String& akey = kv.first;
				const Value& avalue = kv.second;
				location.emplace_back(akey);
				TIValidateOTLPMetricsWriter_3(object, akey, avalue, location, utils);
				location.pop_back();
			}
		}
		return;
	} while (0);

}

static void TIValidateOTLPMetricsWriterTlsCaFile(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

static void TIValidateOTLPMetricsWriterTlsCertFile(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

static void TIValidateOTLPMetricsWriterTlsInsecureNoverify(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, bool value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (!value)
		return;

}

static void TIValidateOTLPMetricsWriterTlsKeyFile(const intrusive_ptr<ObjectImpl<OTLPMetricsWriter> >& object, const String& value, std::vector<String>& location, const ValidationUtils& utils)
{
	if (value.IsEmpty())
		return;

}

void ObjectImpl<OTLPMetricsWriter>::ValidateBasicAuth(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateBasicAuth(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("basic_auth");
	TIValidateOTLPMetricsWriterBasicAuth(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateDisconnectTimeout(const Lazy<int>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateDisconnectTimeout(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("disconnect_timeout");
	TIValidateOTLPMetricsWriterDisconnectTimeout(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateEnableHa(const Lazy<bool>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateEnableHa(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("enable_ha");
	TIValidateOTLPMetricsWriterEnableHa(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateEnableSendThresholds(const Lazy<bool>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateEnableSendThresholds(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("enable_send_thresholds");
	TIValidateOTLPMetricsWriterEnableSendThresholds(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateEnableTls(const Lazy<bool>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateEnableTls(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("enable_tls");
	TIValidateOTLPMetricsWriterEnableTls(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateFlushInterval(const Lazy<int>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateFlushInterval(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("flush_interval");
	TIValidateOTLPMetricsWriterFlushInterval(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateFlushThreshold(const Lazy<int64_t>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateFlushThreshold(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("flush_threshold");
	TIValidateOTLPMetricsWriterFlushThreshold(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateHost(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateHost(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("host");
	TIValidateOTLPMetricsWriterHost(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateHostResourceAttributes(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateHostResourceAttributes(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("host_resource_attributes");
	TIValidateOTLPMetricsWriterHostResourceAttributes(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateMetricsEndpoint(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateMetricsEndpoint(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("metrics_endpoint");
	TIValidateOTLPMetricsWriterMetricsEndpoint(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidatePort(const Lazy<int>& lvalue, const ValidationUtils& utils)
{
	SimpleValidatePort(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("port");
	TIValidateOTLPMetricsWriterPort(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateServiceNamespace(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateServiceNamespace(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("service_namespace");
	TIValidateOTLPMetricsWriterServiceNamespace(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateServiceResourceAttributes(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateServiceResourceAttributes(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("service_resource_attributes");
	TIValidateOTLPMetricsWriterServiceResourceAttributes(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateTlsCaFile(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateTlsCaFile(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("tls_ca_file");
	TIValidateOTLPMetricsWriterTlsCaFile(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateTlsCertFile(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateTlsCertFile(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("tls_cert_file");
	TIValidateOTLPMetricsWriterTlsCertFile(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateTlsInsecureNoverify(const Lazy<bool>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateTlsInsecureNoverify(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("tls_insecure_noverify");
	TIValidateOTLPMetricsWriterTlsInsecureNoverify(this, lvalue(), location, utils);
	location.pop_back();
}

void ObjectImpl<OTLPMetricsWriter>::ValidateTlsKeyFile(const Lazy<String>& lvalue, const ValidationUtils& utils)
{
	SimpleValidateTlsKeyFile(lvalue, utils);
	std::vector<String> location;
	location.emplace_back("tls_key_file");
	TIValidateOTLPMetricsWriterTlsKeyFile(this, lvalue(), location, utils);
	location.pop_back();
}

}
#pragma GCC diagnostic pop
