From 9736b8c8ede6a0d121dea8381f0abb561fad5631 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 19 Feb 2019 01:50:58 +0200 Subject: Implemented auto generated web clients for PPC and machine studio. Improved interactions with web clients across solutions. --- .../PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs new file mode 100644 index 000000000..e5c1beb4a --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs @@ -0,0 +1,106 @@ + +using System.Threading.Tasks; +using Tango.Web; +using Tango.Web.Authentication; + +namespace Tango.PPC.Common.Web +{ + /// + /// Represents a machine service PPC web client. + /// + /// + public abstract class PPCWebClientBase : TangoWebClient + { + /// + /// Initializes a new instance of the class. + /// + /// The environment. + /// Existing token. + public PPCWebClientBase(DeploymentSlot environment, WebToken token) : base(environment, "PPC", token) + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The environment. + public PPCWebClientBase(DeploymentSlot environment) : this(environment, null) + { + + } + + /// + /// Executes the MachineSetup action and returns Tango.PPC.Common.Web.MachineSetupResponse. + /// + /// + public Task MachineSetup(Tango.PPC.Common.Web.MachineSetupRequest request) + { + return Post("MachineSetup", request); + } + + /// + /// Executes the MachineUpdate action and returns Tango.PPC.Common.Web.DownloadUpdateResponse. + /// + /// + public Task MachineUpdate(Tango.PPC.Common.Web.DownloadUpdateRequest request) + { + return Post("MachineUpdate", request); + } + + /// + /// Executes the CheckForUpdate action and returns Tango.PPC.Common.Web.CheckForUpdateResponse. + /// + /// + public Task CheckForUpdate(Tango.PPC.Common.Web.CheckForUpdateRequest request) + { + return Post("CheckForUpdate", request); + } + + /// + /// Executes the UpdateDB action and returns Tango.PPC.Common.Web.UpdateDBResponse. + /// + /// + public Task UpdateDB(Tango.PPC.Common.Web.UpdateDBRequest request) + { + return Post("UpdateDB", request); + } + + /// + /// Executes the GetLatestVersion action and returns Tango.PPC.Common.Web.LatestVersionResponse. + /// + /// + public Task GetLatestVersion(Tango.PPC.Common.Web.LatestVersionRequest request) + { + return Post("GetLatestVersion", request); + } + + /// + /// Executes the UploadVersion action and returns Tango.PPC.Common.Web.UploadVersionResponse. + /// + /// + public Task UploadVersion(Tango.PPC.Common.Web.UploadVersionRequest request) + { + return Post("UploadVersion", request); + } + + /// + /// Executes the NotifyUploadCompleted action and returns Tango.PPC.Common.Web.UploadCompletedResponse. + /// + /// + public Task NotifyUploadCompleted(Tango.PPC.Common.Web.UploadCompletedRequest request) + { + return Post("NotifyUploadCompleted", request); + } + + /// + /// Executes the GetMachineVersions action and returns Tango.PPC.Common.Web.MachineVersionsResponse. + /// + /// + public Task GetMachineVersions(Tango.PPC.Common.Web.MachineVersionsRequest request) + { + return Post("GetMachineVersions", request); + } + + } +} -- cgit v1.3.1