using System;
using System.Threading.Tasks;
using Tango.Web;
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, String token) : base(environment, "PPC", token)
{
}
///
/// Initializes a new instance of the class.
///
/// The environment.
public PPCWebClientBase(DeploymentSlot environment) : this(environment, null)
{
}
///
/// Initializes a new instance of the class.
///
/// The service address.
/// Existing token.
public PPCWebClientBase(String address, String token) : base(address, "PPC", token)
{
}
///
/// 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 CheckForUpdates action and returns Tango.PPC.Common.Web.CheckForUpdateResponse.
///
///
public Task CheckForUpdates(Tango.PPC.Common.Web.CheckForUpdateRequest request)
{
return Post("CheckForUpdates", 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 NotifyVersionUploadCompleted action and returns Tango.PPC.Common.Web.UploadCompletedResponse.
///
///
public Task NotifyVersionUploadCompleted(Tango.PPC.Common.Web.UploadCompletedRequest request)
{
return Post("NotifyVersionUploadCompleted", 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);
}
}
}