#include <iostream>
#include <vector>
#include <string>
#include <boost/make_shared.hpp>
#include <boost/optional.hpp>
using namespace std; // consider removing this line in serious projects
typedef unsigned char uint8_t;
struct EVENT
{
enum EProcedureResult : uint8_t
{
EProcedureResult_Failed = 0,
EProcedureResult_Succeeded = 1
};
enum EErrorCode : uint8_t
{
EErrorCode_NA = 1,
EErrorCode_Unspecified = 2,
EErrorCode_NoPrivileges = 3,
EErrorCode_QuotaLimit = 4,
EErrorCode_SystemLimit = 5,
EErrorCode_SystemFailure = 6,
EErrorCode_NotPossible = 7,
EErrorCode_DoesNotExist = 8,
EErrorCode_NotAvailable = 9,
EErrorCode_InvalidParameters = 10,
EErrorCode_WrongCredentials = 11,
EErrorCode_NotReachable = 12,
EErrorCode_MaxLoginAttemptsExceeded = 13
};
struct ChangedObjectDetails
{
boost::optional<std::string> targetDN;
boost::optional<std::string> parameterName;
boost::optional<std::string> parameterValue;
boost::optional<bool> isDeleted;
ChangedObjectDetails();
~ChangedObjectDetails();
ChangedObjectDetails(const ChangedObjectDetails&);
ChangedObjectDetails& operator=(const ChangedObjectDetails&);
ChangedObjectDetails(
const boost::optional<std::string>& targetDN,
const boost::optional<std::string>& parameterName,
const boost::optional<std::string>& parameterValue,
const boost::optional<bool>& isDeleted
);
};
std::string procedureStartDate;
std::string procedureFinishDate;
std::string sessionId;
std::string sessionTime;
std::string clientIpAddress;
std::string userName;
std::string operation;
std::string additionalText;
std::vector<ChangedObjectDetails> changedObjectDetails;
boost::optional<EErrorCode> errorCode;
EProcedureResult procedureResult;
EVENT();
~EVENT();
EVENT(const EVENT&);
EVENT& operator=(const EVENT&);
EVENT(
const std::vector<EVENT::ChangedObjectDetails>& changedObjectDetails,
const std::string& procedureStartDate,
const std::string& procedureFinishDate,
const std::string& sessionId,
const std::string& sessionTime,
const std::string& clientIpAddress,
const std::string& userName,
const std::string& operation,
const EVENT::EProcedureResult procedureResult,
const std::string& additionalText,
const boost::optional<EVENT::EErrorCode>& errorCode
);
};
int main()
{
int a = sizeof(EVENT);
std::cout << "ym a: " << a << std::endl;
return 0;
}