using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using BookingModule.Entity;

namespace BookingService
{
    /// <summary>
    /// Contract description of our Internal booking service
    /// </summary>
    [ServiceContract]
    public interface IBookingService
    {
        /// <summary>
        /// Get Availability based on the request object
        /// </summary>
        [OperationContract]
        [WebInvoke(
            Method = "*",
            UriTemplate = "GetAvailability/",
            BodyStyle = WebMessageBodyStyle.Wrapped,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json)]
        AvailabilityResponse GetAvailability(AvailabilityRequest request);

        /// <summary>
        /// Get last requests logged on the system
        /// </summary>
        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "GetLastRequests/",
            BodyStyle = WebMessageBodyStyle.Wrapped,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json)]
        List<AvailabilityRequest> GetLastRequests();

    }
}
