#ifndef __OCPP21_ENUM_H__
#define __OCPP21_ENUM_H__
#include <stdbool.h>
#include <time.h>

//3. Enumerations

// 3.1
typedef enum APNAuthenticationEnumType
{
	APNAuthenticationEnumType_PAP = 1,
	APNAuthenticationEnumType_CHAP,
	APNAuthenticationEnumType_NONE,
	APNAuthenticationEnumType_AUTO,
}APNAuthenticationEnumType_t;

int APNAuthenticationEnumType_fromString(const char *string);

const char* APNAuthenticationEnumType_toString(APNAuthenticationEnumType_t type);

// 3.2
typedef enum AttributeEnumType
{
	AttributeEnumType_Actual = 1,
	AttributeEnumType_Target,
	AttributeEnumType_MinSet,
	AttributeEnumType_MaxSet,
}AttributeEnumType_t;

int AttributeEnumType_fromString(const char *string);

const char* AttributeEnumType_toString(AttributeEnumType_t type);

// 3.3
typedef enum AuthorizationStatusEnumType
{
	AuthorizationStatusEnumType_Accepted = 1,
	AuthorizationStatusEnumType_Blocked,
	AuthorizationStatusEnumType_ConcurrentTx,
	AuthorizationStatusEnumType_Expired,
	AuthorizationStatusEnumType_NoCredit,
	AuthorizationStatusEnumType_NotAllowedTypeEVSE,
	AuthorizationStatusEnumType_NotAtThisLocation,
	AuthorizationStatusEnumType_NotAtThisTime,
	AuthorizationStatusEnumType_Unknown,
}AuthorizationStatusEnumType_t;

int AuthorizationStatusEnumType_fromString(const char *string);

const char* AuthorizationStatusEnumType_toString(AuthorizationStatusEnumType_t type);

// 3.4
typedef enum AuthorizeCertificateStatusEnumType
{
	AuthorizeCertificateStatusEnumType_Accepted = 1,
	AuthorizeCertificateStatusEnumType_SignatureError,
	AuthorizeCertificateStatusEnumType_CertificateExpired,
	AuthorizeCertificateStatusEnumType_CertificateRevoked,
	AuthorizeCertificateStatusEnumType_NoCertificateAvailable,
	AuthorizeCertificateStatusEnumType_CertChainError,
	AuthorizeCertificateStatusEnumType_ContractCancelled,
}AuthorizeCertificateStatusEnumType_t;

int AuthorizeCertificateStatusEnumType_fromString(const char *string);

const char* AuthorizeCertificateStatusEnumType_toString(AuthorizeCertificateStatusEnumType_t type);

// 3.5
typedef enum BatterySwapEventEnumType
{
	BatterySwapEventEnumType_BatteryIn = 1,
	BatterySwapEventEnumType_BatteryOut,
	BatterySwapEventEnumType_BatteryOutTimeout,
}BatterySwapEventEnumType_t;

int BatterySwapEventEnumType_fromString(const char *string);

const char* BatterySwapEventEnumType_toString(BatterySwapEventEnumType_t type);

// 3.6
typedef enum BootReasonEnumType
{
	BootReasonEnumType_ApplicationReset = 1,
	BootReasonEnumType_FirmwareUpdate,
	BootReasonEnumType_LocalReset,
	BootReasonEnumType_PowerUp,
	BootReasonEnumType_RemoteReset,
	BootReasonEnumType_ScheduledReset,
	BootReasonEnumType_Triggered,
	BootReasonEnumType_Unknown,
	BootReasonEnumType_Watchdog,
}BootReasonEnumType_t;

// 3.7
typedef enum CancelReservationStatusEnumType
{
	CancelReservationStatusEnumType_Accepted = 1,
	CancelReservationStatusEnumType_Rejected,
}CancelReservationStatusEnumType_t;

// 3.8
typedef enum CertificateActionEnumType
{
	CertificateActionEnumType_Install = 1,
	CertificateActionEnumType_Update,
}CertificateActionEnumType_t;

// 3.9
typedef enum CertificateSignedStatusEnumType
{
	CertificateSignedStatusEnumType_Accepted = 1,
	CertificateSignedStatusEnumType_Rejected,
}CertificateSignedStatusEnumType_t;

// 3.10
typedef enum CertificateSigningUseEnumType
{
	CertificateSigningUseEnumType_V2GCertificate = 1,
	CertificateSigningUseEnumType_V2G20Certificate,
}CertificateSigningUseEnumType_t;

// 3.11
typedef enum CertificateStatusEnumType
{
	CertificateStatusEnumType_Good = 1,
	CertificateStatusEnumType_Revoked,
	CertificateStatusEnumType_Unknown,
	CertificateStatusEnumType_Failed,
}CertificateStatusEnumType_t;

// 3.12
typedef enum CertificateStatusSourceEnumType
{
	CertificateStatusSourceEnumType_CRL = 1,
	CertificateStatusSourceEnumType_OCSP,
}CertificateStatusSourceEnumType_t;

// 3.13
typedef enum ChangeAvailabilityStatusEnumType
{
	ChangeAvailabilityStatusEnumType_Accepted = 1,
	ChangeAvailabilityStatusEnumType_Rejected,
	ChangeAvailabilityStatusEnumType_Scheduled,
}ChangeAvailabilityStatusEnumType_t;

// 3.14
typedef enum ChargingProfileKindEnumType
{
	ChargingProfileKindEnumType_Absolute = 1,
	ChargingProfileKindEnumType_Recurring,
	ChargingProfileKindEnumType_Relative,
	ChargingProfileKindEnumType_Dynamic,
}ChargingProfileKindEnumType_t;

// 3.15
typedef enum ChargingProfilePurposeEnumType
{
	ChargingProfilePurposeEnumType_ChargingStationExternalConstraints = 1,
	ChargingProfilePurposeEnumType_ChargingStationMaxProfile,
	ChargingProfilePurposeEnumType_TxDefaultProfile,
	ChargingProfilePurposeEnumType_TxProfile,
	ChargingProfilePurposeEnumType_PriorityCharging,
	ChargingProfilePurposeEnumType_LocalGeneration,
}ChargingProfilePurposeEnumType_t;

// 3.16
typedef enum ChargingProfileStatusEnumType
{
	ChargingProfileStatusEnumType_Accepted = 1,
	ChargingProfileStatusEnumType_Rejected,
}ChargingProfileStatusEnumType_t;

// 3.17
typedef enum ChargingRateUnitEnumType
{
	ChargingRateUnitEnumType_Accepted = 1,
	ChargingRateUnitEnumType_Rejected,
}ChargingRateUnitEnumType_t;

// 3.18
typedef enum ChargingStateEnumType
{
	ChargingStateEnumType_EVConnected = 1,
	ChargingStateEnumType_Charging,
	ChargingStateEnumType_SuspendedEV,
	ChargingStateEnumType_SuspendedEVSE,
	ChargingStateEnumType_Idle,
}ChargingStateEnumType_t;

// 3.19
typedef enum ClearCacheStatusEnumType
{
	ClearCacheStatusEnumType_Accepted = 1,
	ClearCacheStatusEnumType_Rejected,
}ClearCacheStatusEnumType_t;

// 3.20
typedef enum ClearChargingProfileStatusEnumType
{
	ClearChargingProfileStatusEnumType_Accepted = 1,
	ClearChargingProfileStatusEnumType_Unknown,
}ClearChargingProfileStatusEnumType_t;

// 3.21
typedef enum ClearMessageStatusEnumType
{
	ClearMessageStatusEnumType_Accepted = 1,
	ClearMessageStatusEnumType_Unknown,
	ClearMessageStatusEnumType_Rejected,
}ClearMessageStatusEnumType_t;

// 3.22
typedef enum ClearMonitoringStatusEnumType
{
	ClearMonitoringStatusEnumType_Accepted = 1,
	ClearMonitoringStatusEnumType_Rejected,
	ClearMonitoringStatusEnumType_NotFound,
}ClearMonitoringStatusEnumType_t;

// 3.23
typedef enum ComponentCriterionEnumType
{
	ComponentCriterionEnumType_Active = 1,
	ComponentCriterionEnumType_Available,
	ComponentCriterionEnumType_Enabled,
	ComponentCriterionEnumType_Problem,
}ComponentCriterionEnumType_t;

// 3.24
typedef enum ConnectorStatusEnumType
{
	ConnectorStatusEnumType_Available = 1,
	ConnectorStatusEnumType_Occupied,
	ConnectorStatusEnumType_Reserved,
	ConnectorStatusEnumType_Unavailable,
	ConnectorStatusEnumType_Faulted,
}ConnectorStatusEnumType_t;

// 3.25
typedef enum ControlModeEnumType
{
	ControlModeEnumType_ScheduledControl = 1,
	ControlModeEnumType_DynamicControl,
}ControlModeEnumType_t;

// 3.26
typedef enum CostDimensionEnumType
{
	CostDimensionEnumType_Energy = 1,
	CostDimensionEnumType_MaxCurrent,
	CostDimensionEnumType_MinCurrent,
	CostDimensionEnumType_MaxPower,
	CostDimensionEnumType_MinPower,
	CostDimensionEnumType_IdleTIme,
	CostDimensionEnumType_ChargingTime,
}CostDimensionEnumType_t;

// 3.27
typedef enum CostKindEnumType
{
	CostKindEnumType_CarbonDioxideEmission = 1,
	CostKindEnumType_RelativePricePercentage,
	CostKindEnumType_RenewableGenerationPercentage,
}CostKindEnumType_t;

// 3.28
typedef enum CustomerInformationStatusEnumType
{
	CustomerInformationStatusEnumType_Accepted = 1,
	CustomerInformationStatusEnumType_Rejected,
	CustomerInformationStatusEnumType_Invalid,
}CustomerInformationStatusEnumType_t;

// 3.29
typedef enum DataEnumType
{
	DataEnumType_string = 1,
	DataEnumType_decimal,
	DataEnumType_integer,
	DataEnumType_dateTime,
	DataEnumType_boolean,
	DataEnumType_OptionList,
	DataEnumType_SequenceList,
	DataEnumType_MemberList,
}DataEnumType_t;

#endif //__OCPP21_ENUM_H__
