I'm having trouble deciding how to design this service API.public class GetCurrentValuesRequest{    public int ReferenceID { get; set; }    public int[] FilterIDs { get; set; }}public class GetDefaultValuesRequest{    public int[] FilterIDs { get; set; }}public class GetValuesAsOfDateRequest{    public int ReferenceID { get; set; }    public int[] FilterIDs { get; set; }    public DateTime AsOf { get; set; }}public class GetValuesAsOfChangeSetRequest{    public int ReferenceID { get; set; }    public int[] FilterIDs { get; set; }    public long ChangeSetIDs { get; set; }}public class GetProposedValuesRequest{    public int ReferenceID { get; set; }    public int[] FilterIDs { get; set; }    public long ApprovalKey { get; set; }}public class GetValuesIfModifiedRequest{    public int ReferenceID { get; set; }    public int[] FilterIDs { get; set; }    public DateTime Since { get; set; }}public class GetValuesResponse{    public string[] Results { get; set; }}public class GetValuesIfModifiedResponse{    public string[] Results { get; set; }    public bool IsModified { get; set; }}public interface IService{    GetValuesResponse GetValues(GetCurrentValuesRequest request);    GetValuesResponse GetValues(GetDefaultValuesRequest request);    GetValuesResponse GetValues(GetValuesAsOfDateRequest request);    GetValuesResponse GetValues(GetValuesAsOfChangeSetRequest request);    GetValuesResponse GetValues(GetProposedValuesRequest request);    GetValuesIfModifiedResponse GetValuesIfModified(GetValuesIfModifiedRequest request);}I've thought about changing it to have make the IfModified request / response subclasses of the simple GetValues request response and only including one GetValues call. The server would return a different response depending on the input request, but that requires user to call IService this:var response = (GetValuesIfModifiedResponse)serviceClient.GetValues(new GetValuesIfModifiedRequest() { ... });I've also thought about placing IsModified in the simple GetValuesResponse, and only populating it if a GetValuesIfModifiedRequest is passed into it. But that seems a bit strange to include it in a result from a method which does not actually do anything with it. Also, it might throw of a user if they see it and expect to be able to use it in their code. bool? IsModified is better, but I'm not entirely sold on it just yet.Any suggestions for how to best design this API?
Designing an API for service operations with closely related parameters
c#;design;wcf;api design
In my opinion, your sole request object should look something like this:public class GetValuesRequest{    public int[] FilterIDs { get; set; }    public DateTime SearchDate { get; set; }    public SearchType SearchType { get; set; }}public enum SearchType{    AsOf,    Since}You can tweak this to your taste, but the point is that there is only one search date submitted, and the enum provides a switch mechanism between past and future.You can then return an object thusly:public class GetValuesResponse{    public string[] Results { get; set; }    public CacheState CacheResult { get; set; }}public enum CacheState{    Modified,    Unmodified,    NotChecked}