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 DRowsRequest { /// /// Comma separated list of External Ids for each Data Source that the app wants to synchronize. /// 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; } /// /// Comma separated list of last updated values for each external id in Ids that the app wants to synchronize. /// Values are listed in the same order as Ids and will contain a blank value if the related data source have not been requested before. /// 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 string LastUpdateds { get; set; } /// /// Your unique Company Id, found on the Organization Setup page in the platform /// public int ProviderId { get; set; } /// /// Your unique Integration Key, found on the Organization 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; } } /// /// 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 LastUpdateds 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 { } }