aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/PPCWebClientBase.cs
blob: 0363285f8f33e8704588e4c6248110172464d860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
using System;
using System.Threading.Tasks;
using Tango.Web;

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, String 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>
        /// Initializes a new instance of the <see cref="PPCWebClientBase"/> class.
        /// </summary>
        /// <param name="address">The service address.</param>
        /// <param name="token">Existing token.</param>
        public PPCWebClientBase(String address, String token) : base(address, "PPC", token)
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PPCWebClientBase"/> class.
        /// </summary>
        /// <param name="cloned">Other instance.</param>
        public PPCWebClientBase(PPCWebClientBase cloned) : base(cloned)
        {

        }

        /// <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 NotifyUpdateCompleted action and returns Tango.PPC.Common.Web.MachineUpdateCompletedResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.MachineUpdateCompletedResponse> NotifyUpdateCompleted(Tango.PPC.Common.Web.MachineUpdateCompletedRequest request)
        {
            return Post<Tango.PPC.Common.Web.MachineUpdateCompletedRequest, Tango.PPC.Common.Web.MachineUpdateCompletedResponse>("NotifyUpdateCompleted", request);
        }

        /// <summary>
        /// Executes the CheckForUpdates action and returns Tango.PPC.Common.Web.CheckForUpdateResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.CheckForUpdateResponse> CheckForUpdates(Tango.PPC.Common.Web.CheckForUpdateRequest request)
        {
            return Post<Tango.PPC.Common.Web.CheckForUpdateRequest, Tango.PPC.Common.Web.CheckForUpdateResponse>("CheckForUpdates", 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 UploadMachineData action and returns Tango.PPC.Common.Web.UploadMachineDataResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.UploadMachineDataResponse> UploadMachineData(Tango.PPC.Common.Web.UploadMachineDataRequest request)
        {
            return Post<Tango.PPC.Common.Web.UploadMachineDataRequest, Tango.PPC.Common.Web.UploadMachineDataResponse>("UploadMachineData", request);
        }

        /// <summary>
        /// Executes the DownloadMachineData action and returns Tango.PPC.Common.Web.DownloadMachineDataResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.DownloadMachineDataResponse> DownloadMachineData(Tango.PPC.Common.Web.DownloadMachineDataRequest request)
        {
            return Post<Tango.PPC.Common.Web.DownloadMachineDataRequest, Tango.PPC.Common.Web.DownloadMachineDataResponse>("DownloadMachineData", request);
        }

        /// <summary>
        /// Executes the NotifyMachineDataDownloadCompleted action and returns Tango.PPC.Common.Web.NotifyMachineDataDownloadCompletedResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.NotifyMachineDataDownloadCompletedResponse> NotifyMachineDataDownloadCompleted(Tango.PPC.Common.Web.NotifyMachineDataDownloadCompletedRequest request)
        {
            return Post<Tango.PPC.Common.Web.NotifyMachineDataDownloadCompletedRequest, Tango.PPC.Common.Web.NotifyMachineDataDownloadCompletedResponse>("NotifyMachineDataDownloadCompleted", request);
        }

        /// <summary>
        /// Executes the SendSMS action and returns Tango.PPC.Common.Web.SendSMSResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.SendSMSResponse> SendSMS(Tango.PPC.Common.Web.SendSMSRequest request)
        {
            return Post<Tango.PPC.Common.Web.SendSMSRequest, Tango.PPC.Common.Web.SendSMSResponse>("SendSMS", 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 GetTags action and returns Tango.PPC.Common.Web.GetTagsResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.GetTagsResponse> GetTags(Tango.PPC.Common.Web.GetTagsRequest request)
        {
            return Post<Tango.PPC.Common.Web.GetTagsRequest, Tango.PPC.Common.Web.GetTagsResponse>("GetTags", 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 NotifyVersionUploadCompleted action and returns Tango.PPC.Common.Web.UploadCompletedResponse.
        /// </summary>
        /// <returns></returns>
        public Task<Tango.PPC.Common.Web.UploadCompletedResponse> NotifyVersionUploadCompleted(Tango.PPC.Common.Web.UploadCompletedRequest request)
        {
            return Post<Tango.PPC.Common.Web.UploadCompletedRequest, Tango.PPC.Common.Web.UploadCompletedResponse>("NotifyVersionUploadCompleted", 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);
        }

    }
}