C sharp Hosted GET code

using System;
using System.Collections.Generic;

namespace Example.HostedGET
{
// Data Transfer Object (DTO) classes for web services linked to Hosted GET connectors on Data Sources.
// A Hosted GET service exposes the rows for a Data Source from an external system/database.
// The service must accept the request payload described in the DRows class below,
// and must respond with the payload described in the DRowsResponse class.

///
/// Request DTO class for calls made by the app to Hosted GET web services.
///

public class DRows
{
///
/// Comma separated list of External Ids for each Data Source that the app wants to synchronise.
/// You set the External Id on the Data Source via the App Builder -> Data Sources -> Settings page in the platform.
///

public string Ids { get; set; }

///
/// Your unique Company Id, found on the Organisation Setup page in the platform
///

public int ProviderId { get; set; }

///
/// Your unique Integration Key, found on the Organisation Setup page in the platform
///

public string IntegrationKey { get; set; }

///
/// Email address of the logged in app user making the request
///

public string Email { get; set; }

///
/// The last time that the app checked for Data Source updates.
/// Use this to implement incremental app updates, passing back just the new/updated and delete rows since the time the app checked in.
/// This is recommended for large Data Sources to save server resources and prevent exhausting mobile data allocations.
///

public DateTime LastUpdated { get; set; }

}

///
/// Response DTO class for calls made by the app to Hosted GET web services.
///

public class DRowsResponse
{
///
/// Collection containing the DataSources that have been requested.
///

public DSources DataSources { get; set; }

///
/// The last time that the rows for this Data Source were updated.
/// We recommend that this be the current date and time on your host server at the time of processing the request.
/// This value is stored by the app and sent in the LastUpdated field of the next Row Search request made by the app.
/// This gives a central point of time for incremental updates in particular, since the app will echo your server times rather than use its own unreliable device time.
///

public DateTime LastUpdated { get; set; }
}

public class DSource
{
///
/// The External Id of the DataSource for which the associated Row data applies. Must match the External Id configured in the Data Source -> Settings page on the platform.
///

public string Id { get; set; }

///
/// A collection of Rows that will completely replace all current Data Source rows on app.
/// If you specify Rows, then any values in NewRows and DeletedRows will be ignored.
///

public Rows Rows { get; set; }

///
/// A collection of Rows that should be added/updated onto the existing Data Source rows on the app.
/// Use this field to perform incremental inserts/updates of your Data Source.
///

public Rows NewRows { get; set; }

///
/// A collection of Row Items that should be deleted from the existing Data Source rows on the app.
/// Use this field to perform incremental deletes of your Data Source.
/// Each Row should contain a single Val element that is your unique identifier for the Row to delete.
///

public Rows DeletedRows { get; set; }
}

public class DSources : List { }

public class Rows : List { }

public class Row : List { }

}