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 { }

}

Improved SharePoint Integration. Form Settings. Install FormsFly Trial the Android App. Can I re-brand the App?. Dynamic Answers and Calculations. What if I don’t have a signal?. How Secure is My Data?. Still Suffering? Take Your Tablet!. New External User Auth Functionality. I want to check or amend the completed forms before they go to my client.. Geo Update Now In Preview. Send Form Data to Word/PDF/Excel. Send a Task to a Mobile User. Send Form Data to a Web Service. Troubleshooting the app. Your Finger is a Pencil. Dynamic Titles and Hints. Import Tasks from Excel. Save Money 5 Ways with Mobile Forms. How to Login to the Platform.