using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace UnifiedPOS.ItemDispenser.V1_4
{
    [ServiceContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public interface ItemDispenser
    {
        #region Version 1.1

        //
        // Common Properties
        //

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetAutoDisableResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //bool GetAutoDisable(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetAutoDisableResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void SetAutoDisable(string ConsumerID, bool AutoDisable);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapCompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapCompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapCompareFirmwareVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapPowerReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapPowerReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        PowerReporting GetCapPowerReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapStatisticsReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapStatisticsReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapStatisticsReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapUpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapUpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapUpdateFirmware(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapUpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapUpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapUpdateStatistics(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCheckHealthText", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCheckHealthTextResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetCheckHealthText(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetClaimed", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetClaimedResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetClaimed(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDataCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDataCountResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //int GetDataCount(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDataEventEnabledResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //bool GetDataEventEnabled(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetDataEventEnabledResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void SetDataEventEnabled(string ConsumerID, bool DataEventEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetDeviceEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void SetDeviceEnabled(string ConsumerID, bool DeviceEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetFreezeEvents(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void SetFreezeEvents(string ConsumerID, bool FreezeEvents);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetOutputID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetOutputIDResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //int GetOutputID(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        PowerNotification GetPowerNotify(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void SetPowerNotify(string ConsumerID, PowerNotification PowerNotify);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPowerState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPowerStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        PowerState GetPowerState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        ControlState GetState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceControlDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceControlDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetDeviceControlDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceControlVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceControlVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        UposVersion GetDeviceControlVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceServiceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceServiceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetDeviceServiceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceServiceVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDeviceServiceVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        UposVersion GetDeviceServiceVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPhysicalDeviceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPhysicalDeviceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetPhysicalDeviceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPhysicalDeviceName", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetPhysicalDeviceNameResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetPhysicalDeviceName(string ConsumerID);

        //
        // Specific Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapEmptySensor", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapEmptySensorResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapEmptySensor(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapIndividualSlotStatus", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapIndividualSlotStatusResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapIndividualSlotStatus(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapJamSensor", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapJamSensorResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapJamSensor(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapNearEmptySensor", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetCapNearEmptySensorResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        bool GetCapNearEmptySensor(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDispenserStatus", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetDispenserStatusResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        ItemDispenserStatus GetDispenserStatus(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetMaxSlots", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetMaxSlotsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        int GetMaxSlots(string ConsumerID);

        //
        // Common Methods
        //

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/Open", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/OpenResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void Open(string ConsumerID, string EndpointAddress);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/Close", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CloseResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void Close(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/Claim", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClaimResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void Claim(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/Release", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ReleaseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void Release(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CheckHealth", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CheckHealthResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void CheckHealth(string ConsumerID, HealthCheckLevel Level);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearInput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearInputResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void ClearInput(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearInputProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearInputPropertiesResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void ClearInputProperties(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearOutput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ClearOutputResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        //void ClearOutput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/DirectIO", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/DirectIOResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        DirectIOData DirectIO(string ConsumerID, int Command, int Data, object Obj);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        CompareFirmwareResult CompareFirmwareVersion(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ResetStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ResetStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void ResetStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/RetrieveStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/RetrieveStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string RetrieveStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void UpdateFirmware(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void UpdateStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        //
        // Specific Methods
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/AdjustItemCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/AdjustItemCountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void AdjustItemCount(string ConsumerID, int ItemCount, int SlotNumber);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/DispenseItem", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/DispenseItemResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        int DispenseItem(string ConsumerID, int NumItem, int SlotNumber);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ReadItemCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/ReadItemCountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        int ReadItemCount(string ConsumerID, int SlotNumber);

        #endregion

        #region Version 1.2

        //
        // Session Management
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetWSPOSVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetWSPOSVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        UposVersion GetWSPOSVersion();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GenerateConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GenerateConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GenerateConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/OpenSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/OpenSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void OpenSession(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CloseSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CloseSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void CloseSession(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetProviderSessionTimeout", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetProviderSessionTimeoutResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        int GetProviderSessionTimeout(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/KeepAlive", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/KeepAliveResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void KeepAlive(string ConsumerID);

        //
        // Device Control
        // 

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/OpenDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/OpenDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void OpenDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CloseDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/CloseDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void CloseDevice(string ConsumerID);

        //
        // Event Polling
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/PollForUPOSEvent", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/PollForUPOSEventResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        ItemDispenserEvent PollForUPOSEvent(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetEventResponse", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/SetEventResponseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        void SetEventResponse(string ConsumerID, ItemDispenserEventResponse EventResponse);

        #endregion

        #region Version 1.3

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetEncryptedClaimedConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/GetEncryptedClaimedConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/UposException", Name = "UposException")]
        string GetEncryptedClaimedConsumerID();

        #endregion
    }

    #region Version 1.1

    //
    // Common Data Types
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class DirectIOData
    {
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class UposException
    {
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class UposVersion
    {
        [DataMember]
        public int Major { get; set; }
        [DataMember]
        public int Minor { get; set; }
        [DataMember]
        public int Build { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class Statistic
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Value { get; set; }
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/", ItemName = "Statistic")]
    public class StatisticList : List<Statistic>
    {
    }

    //
    // Common Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum CompareFirmwareResult
    {
        [EnumMember]
        CFV_FIRMWARE_OLDER,
        [EnumMember]
        CFV_FIRMWARE_SAME,
        [EnumMember]
        CFV_FIRMWARE_NEWER,
        [EnumMember]
        CFV_FIRMWARE_DIFFERENT,
        [EnumMember]
        CFV_FIRMWARE_UNKNOWN,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum ControlState
    {
        [EnumMember]
        S_CLOSED,
        [EnumMember]
        S_IDLE,
        [EnumMember]
        S_BUSY,
        [EnumMember]
        S_ERROR,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum ErrorCode
    {
        [EnumMember]
        E_CLOSED,
        [EnumMember]
        E_CLAIMED,
        [EnumMember]
        E_NOTCLAIMED,
        [EnumMember]
        E_NOSERVICE,
        [EnumMember]
        E_DISABLED,
        [EnumMember]
        E_ILLEGAL,
        [EnumMember]
        E_NOHARDWARE,
        [EnumMember]
        E_OFFLINE,
        [EnumMember]
        E_NOEXIST,
        [EnumMember]
        E_EXISTS,
        [EnumMember]
        E_FAILURE,
        [EnumMember]
        E_TIMEOUT,
        [EnumMember]
        E_BUSY,
        [EnumMember]
        E_EXTENDED,
        [EnumMember]
        E_DEPRECATED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum HealthCheckLevel
    {
        [EnumMember]
        CH_INTERNAL,
        [EnumMember]
        CH_EXTERNAL,
        [EnumMember]
        CH_INTERACTIVE,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum PowerNotification
    {
        [EnumMember]
        PN_DISABLED,
        [EnumMember]
        PN_ENABLED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum PowerReporting
    {
        [EnumMember]
        PR_NONE,
        [EnumMember]
        PR_STANDARD,
        [EnumMember]
        PR_ADVANCED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum PowerState
    {
        [EnumMember]
        PS_UNKNOWN,
        [EnumMember]
        PS_ONLINE,
        [EnumMember]
        PS_OFF,
        [EnumMember]
        PS_OFFLINE,
        [EnumMember]
        PS_OFF_OFFLINE,
    }

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum StatisticCategories
    {
        [EnumMember]
        All,
        [EnumMember]
        Manufacturer,
        [EnumMember]
        Upos,
    }
    */
    public class StatisticCategories
    {
        public const string All = "";
        public const string Manufacturer = "M_";
        public const string Upos = "U_";
    }

    //
    // Specific Data Types
    //

    //
    // Specific Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum ItemDispenserStatus
    {
        [EnumMember]
        ITEM_DS_OK,
        [EnumMember]
        ITEM_DS_EMPTY,
        [EnumMember]
        ITEM_DS_NEAREMPTY,
        [EnumMember]
        ITEM_DS_JAM,
    }

    //
    // Constants
    //

    public class ExtendedError
    {
        public const int EFIRMWARE_BAD_FILE = 281;
        public const int ESTATS_ERROR = 280;
        public const int ESTATS_DEPENDENCY = 282;
    }

    public class StatisticProperties
    {
        public const string CommunicationErrorCount = "CommunicationErrorCount";
        public const string DeviceCategory = "DeviceCategory";
        public const string FirmwareRevision = "FirmwareRevision";
        public const string HoursPoweredCount = "HoursPoweredCount";
        public const string InstallationDate = "InstallationDate";
        public const string Interface = "Interface";
        public const string ManufactureDate = "ManufactureDate";
        public const string ManufacturerName = "ManufacturerName";
        public const string MechanicalRevision = "MechanicalRevision";
        public const string ModelName = "ModelName";
        public const string SerialNumber = "SerialNumber";
        public const string UnifiedPOSVersion = "UnifiedPOSVersion";
    }

    public class Wait
    {
        public const int FOREVER = -1;
    }

    #endregion

    #region Version 1.2

    //
    // Event Polling
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class ItemDispenserEvent
    {
        //[DataMember]
        //public DataEvent DataEvent { get; set; }
        [DataMember]
        public DirectIOEvent DirectIOEvent { get; set; }
        //[DataMember]
        //public ErrorEvent ErrorEvent { get; set; }
        //[DataMember]
        //public OutputCompleteEvent OutputCompleteEvent { get; set; }
        [DataMember]
        public StatusUpdateEvent StatusUpdateEvent { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class ItemDispenserEventResponse
    {
        //[DataMember]
        //public DataEventResponse DataEventResponse { get; set; }
        [DataMember]
        public DirectIOEventResponse DirectIOEventResponse { get; set; }
        //[DataMember]
        //public ErrorEventResponse ErrorEventResponse { get; set; }
        //[DataMember]
        //public OutputCompleteEventResponse OutputCompleteEventResponse { get; set; }
        [DataMember]
        public StatusUpdateEventResponse StatusUpdateEventResponse { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class DataEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class DataEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class DirectIOEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int EventNumber { get; set; }
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class DirectIOEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DirectIOData DirectIOData { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class ErrorEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
        [DataMember]
        public ErrorLocus ErrorLocus { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class ErrorEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class OutputCompleteEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        int OutputID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class OutputCompleteEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class StatusUpdateEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public class StatusUpdateEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum ErrorLocus
    {
        [EnumMember]
        EL_INPUT,
        [EnumMember]
        EL_INPUT_DATA,
        [EnumMember]
        EL_OUTPUT,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/ItemDispenser/")]
    public enum ErrorResponse
    {
        [EnumMember]
        ER_CLEAR,
        [EnumMember]
        ER_CONTINUEINPUT,
        [EnumMember]
        ER_RETRY,
    }
    */
    #endregion
}
