#ifndef ProtobufTranslator_H
#define ProtobufTranslator_H

#include <list>

namespace OpenTestSystem { namespace OtxDiagManager { namespace Common {
	class DResultPb;
	class DResultStatePb;
	class DResponsePb;
	class DComChannelPb;
	class DDiagServicePb;
	class DParameterPb;
	class DResponseParameterPb;
	class DResponseParameterCollectionPb;
	class DValuePb;
	class DParameterCollectionPb;
	class DParameterContainerPb;
	class DComInterfacePb;
	class DErrorPb;
	class DFlashSessionPb;
	enum DAudiencesPb : int;
	enum DDirectionsPb : int;
	class DDbComChannelPb;
	class DDbConfigurationDataPb;
	class DDbConfigurationRecordPb;
	class DDbDataRecordPb;
	class DDbDiagTroubleCodePb;
	class DRequestPb;
	class OnPrimitiveBufferHasResultPb;
}}}

namespace ProtoGenWrapper
{
	class DParameterContainer;
	enum class DAudiences : int;
	class DFlashSession;
	enum class DDirections : int;
	class DDbComChannel;
	class DDbConfigurationData;
	class DDbConfigurationRecord;
	class DDbDataRecord;
	class DParameter;
	class DResponseParameter;
	class DValue;
	class DResult;
	class DResultState;
	class DResponse;
	class ComChannel;
	class DiagService;
	class ComInterface;
	class DError;
	class DDbDiagTroubleCode;
	class DRequest;
	class OnPrimitiveBufferHasResult;

	class ProtobufTranslator
	{
	public:
		// Protobuffer in interne Objekte
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DResultPb* resultPb, const DResult& result);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DResponsePb* responsePb, const DResponse& response);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DComChannelPb* comChannelPb, const ComChannel& comChannel);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDiagServicePb* diagServicePb, const DiagService& diagService);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DParameterPb* parameterPb, const DParameter& parameter);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DResponseParameterPb* parameterPb, const DResponseParameter& parameter);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DValuePb* valuePb, const DValue& value);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DParameterCollectionPb* parametersPb, const std::list<DParameter>& parameters);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DResponseParameterCollectionPb* parametersPb, const std::list<DResponseParameter>& parameters);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DParameterContainerPb* containerPb, const ProtoGenWrapper::DParameterContainer& container);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DComInterfacePb* comChannelPb, const ComInterface& comInterface);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DResultStatePb* resultPb, const DResultState& result);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DErrorPb* resultPb, const DError& result);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DFlashSessionPb* flashSessionPb, const ProtoGenWrapper::DFlashSession& flashSession);
		static OpenTestSystem::OtxDiagManager::Common::DAudiencesPb ToPb(const ProtoGenWrapper::DAudiences& dAudience);
		static OpenTestSystem::OtxDiagManager::Common::DDirectionsPb ToPb(const ProtoGenWrapper::DDirections& dDirection);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDbComChannelPb* dbComChannelDb, const ProtoGenWrapper::DDbComChannel& dbComChannel);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDbConfigurationDataPb* dbConfigurationDataPb, const ProtoGenWrapper::DDbConfigurationData& dbConfigurationData);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDbConfigurationRecordPb* dDbConfigurationRecordPb, const ProtoGenWrapper::DDbConfigurationRecord& dDbConfigurationRecord);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDbDataRecordPb* dDbDataRecordPb, const ProtoGenWrapper::DDbDataRecord& dDbDataRecord);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DDbDiagTroubleCodePb* dDbDiagTroubleCodePb, const ProtoGenWrapper::DDbDiagTroubleCode& dDbDiagTroubleCode);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::DRequestPb* dRequestPb, const DRequest& dRequest);
		static void SetPb(OpenTestSystem::OtxDiagManager::Common::OnPrimitiveBufferHasResultPb* onPrimitiveBufferHasResultPb, const OnPrimitiveBufferHasResult& onPrimitiveBufferHasResult);

		// Interne Objekte in Protobuffer
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DResultPb& responsePb, DResult& response);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DResponsePb& responsePb, DResponse& response);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DComChannelPb& comChannelPb, ComChannel& comChannel);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDiagServicePb& diagServicePb, DiagService& diagService);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DParameterPb& parameterPb, DParameter& parameter);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DResponseParameterPb& parameterPb, DResponseParameter& parameter);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DValuePb& valuePb, DValue& value);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DParameterCollectionPb& parametersPb, std::list<DParameter>& parameters);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DResponseParameterCollectionPb& parametersPb, std::list<DResponseParameter>& parameters);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DParameterContainerPb& containerPb, ProtoGenWrapper::DParameterContainer& container);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DComInterfacePb& comChannelPb, ComInterface& comInterface);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DResultStatePb& responsePb, DResultState& response);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DErrorPb& responsePb, DError& response);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DFlashSessionPb& flashSessionPb, ProtoGenWrapper::DFlashSession& flashSession);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DAudiencesPb& dAudiencePb, ProtoGenWrapper::DAudiences& dAudience);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDirectionsPb& dDirectionPb, ProtoGenWrapper::DDirections& dDirection);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDbComChannelPb& dbComChannelDb, ProtoGenWrapper::DDbComChannel& dbComChannel);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDbConfigurationDataPb& dbConfigurationDataDb, ProtoGenWrapper::DDbConfigurationData& dbConfigurationData);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDbConfigurationRecordPb& dDbConfigurationRecordPb, ProtoGenWrapper::DDbConfigurationRecord& dDbConfigurationRecord);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDbDataRecordPb& dDbDataRecordPb, ProtoGenWrapper::DDbDataRecord& dDbDataRecord);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DDbDiagTroubleCodePb& dDbDataRecordPb, ProtoGenWrapper::DDbDiagTroubleCode& dDbDiagTroubleCode);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::DRequestPb& dRequestPb, DRequest& dRequest);
		static void FromPb(const OpenTestSystem::OtxDiagManager::Common::OnPrimitiveBufferHasResultPb& onPrimitiveBufferHasResultPb, OnPrimitiveBufferHasResult& onPrimitiveBufferHasResult);
	};
}

#endif // ProtobufTranslator_H
