aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs106
1 files changed, 106 insertions, 0 deletions
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
+{
+ /// <summary>
+ /// Represents a machine service PPC web client.
+ /// </summary>
+ /// <seealso cref="Tango.Web.TangoWebClient" />
+ public abstract class PPCWebClientBase : TangoWebClient<Tango.PPC.Common.Web.LoginRequest, Tango.PPC.Common.Web.LoginResponse>
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PPCWebClientBase"/> class.
+ /// </summary>
+ /// <param name="environment">The environment.</param>
+ /// <param name="token">Existing token.</param>
+ public PPCWebClientBase(DeploymentSlot environment, WebToken token) : base(environment, "PPC", token)
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PPCWebClientBase"/> class.
+ /// </summary>
+ /// <param name="environment">The environment.</param>
+ public PPCWebClientBase(DeploymentSlot environment) : this(environment, null)
+ {
+
+ }
+
+ /// <summary>
+ /// Executes the MachineSetup action and returns Tango.PPC.Common.Web.MachineSetupResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.MachineSetupResponse> MachineSetup(Tango.PPC.Common.Web.MachineSetupRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.MachineSetupRequest, Tango.PPC.Common.Web.MachineSetupResponse>("MachineSetup", request);
+ }
+
+ /// <summary>
+ /// Executes the MachineUpdate action and returns Tango.PPC.Common.Web.DownloadUpdateResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.DownloadUpdateResponse> MachineUpdate(Tango.PPC.Common.Web.DownloadUpdateRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.DownloadUpdateRequest, Tango.PPC.Common.Web.DownloadUpdateResponse>("MachineUpdate", request);
+ }
+
+ /// <summary>
+ /// Executes the CheckForUpdate action and returns Tango.PPC.Common.Web.CheckForUpdateResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.CheckForUpdateResponse> CheckForUpdate(Tango.PPC.Common.Web.CheckForUpdateRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.CheckForUpdateRequest, Tango.PPC.Common.Web.CheckForUpdateResponse>("CheckForUpdate", request);
+ }
+
+ /// <summary>
+ /// Executes the UpdateDB action and returns Tango.PPC.Common.Web.UpdateDBResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.UpdateDBResponse> UpdateDB(Tango.PPC.Common.Web.UpdateDBRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.UpdateDBRequest, Tango.PPC.Common.Web.UpdateDBResponse>("UpdateDB", request);
+ }
+
+ /// <summary>
+ /// Executes the GetLatestVersion action and returns Tango.PPC.Common.Web.LatestVersionResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.LatestVersionResponse> GetLatestVersion(Tango.PPC.Common.Web.LatestVersionRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.LatestVersionRequest, Tango.PPC.Common.Web.LatestVersionResponse>("GetLatestVersion", request);
+ }
+
+ /// <summary>
+ /// Executes the UploadVersion action and returns Tango.PPC.Common.Web.UploadVersionResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.UploadVersionResponse> UploadVersion(Tango.PPC.Common.Web.UploadVersionRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.UploadVersionRequest, Tango.PPC.Common.Web.UploadVersionResponse>("UploadVersion", request);
+ }
+
+ /// <summary>
+ /// Executes the NotifyUploadCompleted action and returns Tango.PPC.Common.Web.UploadCompletedResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.UploadCompletedResponse> NotifyUploadCompleted(Tango.PPC.Common.Web.UploadCompletedRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.UploadCompletedRequest, Tango.PPC.Common.Web.UploadCompletedResponse>("NotifyUploadCompleted", request);
+ }
+
+ /// <summary>
+ /// Executes the GetMachineVersions action and returns Tango.PPC.Common.Web.MachineVersionsResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.PPC.Common.Web.MachineVersionsResponse> GetMachineVersions(Tango.PPC.Common.Web.MachineVersionsRequest request)
+ {
+ return Post<Tango.PPC.Common.Web.MachineVersionsRequest, Tango.PPC.Common.Web.MachineVersionsResponse>("GetMachineVersions", request);
+ }
+
+ }
+}