/
ResponseEncodeStatusBaseDTO.cs
174 lines (160 loc) · 5.55 KB
/
ResponseEncodeStatusBaseDTO.cs
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
using Gridwich.Core.Constants;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Diagnostics.CodeAnalysis;
namespace Gridwich.Core.DTO
{
/// <summary>
/// The data object that is serialized and sent back to Requestor when an encode is finished.
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseBaseDTO" />
[JsonObject(ItemRequired = Required.Always)]
public abstract class ResponseEncodeStatusBaseDTO : ResponseBaseDTO
{
/// <summary>
/// Gets or sets the name of the workflow job.
/// </summary>
/// <value>
/// The name of the workflow job.
/// </value>
public string WorkflowJobName { get; set; }
/// <summary>
/// Gets or sets the encoder context.
/// </summary>
/// <value>
/// The encoder context.
/// </value>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Needed for serialize/deserialize")]
public JObject EncoderContext { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeStatusBaseDTO"/> class.
/// </summary>
/// <param name="returnEventType">The event type.</param>
protected ResponseEncodeStatusBaseDTO(string returnEventType)
: base(returnEventType)
{
}
}
/// <summary>
/// Processing DTO
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseEncodeStatusBaseDTO" />
[JsonObject(ItemRequired = Required.Always)]
public class ResponseEncodeProcessingDTO : ResponseEncodeStatusBaseDTO
{
/// <summary>
/// Gets or sets the current status.
/// </summary>
/// <value>
/// The current status.
/// </value>
public string CurrentStatus { get; set; }
/// <summary>
/// Gets or sets the percent complete.
/// </summary>
/// <value>
/// The percent complete.
/// </value>
public int PercentComplete { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeProcessingDTO"/> class.
/// </summary>
/// <param name="returnEventType">The event type.</param>
public ResponseEncodeProcessingDTO(string returnEventType)
: base(returnEventType)
{
}
}
/// <summary>
/// Scheduled DTO
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseEncodeStatusBaseDTO" />
[JsonObject(ItemRequired = Required.Always)]
public class ResponseEncodeScheduledDTO : ResponseEncodeStatusBaseDTO
{
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeScheduledDTO"/> class.
/// </summary>
/// <param name="returnEventType">The event type.</param>
public ResponseEncodeScheduledDTO(string returnEventType)
: base(returnEventType)
{
}
}
/// <summary>
/// Success DO
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseEncodeStatusBaseDTO" />
[JsonObject(ItemRequired = Required.Always)]
public class ResponseEncodeSuccessDTO : ResponseEncodeStatusBaseDTO
{
/// <summary>
/// Gets or sets the outputs.
/// </summary>
/// <value>
/// The outputs.
/// </value>
[property: SuppressMessage("Microsoft.Design", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Not applicable to DTOs")]
public Output[] Outputs { get; set; }
/// <summary>
/// Gets or sets the output container.
/// </summary>
/// <value>
/// The output container.
/// </value>
public string OutputContainer { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeSuccessDTO"/> class.
/// </summary>
/// <param name="returnEventType">The event type to publish on Event Grid.</param>
public ResponseEncodeSuccessDTO(string returnEventType)
: base(returnEventType)
{
}
}
/// <summary>
/// Dispatch DTO
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseEncodeStatusBaseDTO" />
[JsonObject(ItemRequired = Required.Always)]
public class ResponseEncodeDispatchedDTO : ResponseEncodeStatusBaseDTO
{
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeDispatchedDTO"/> class.
/// </summary>
/// <param name="returnEventType">The event type to return to Event Grid.</param>
public ResponseEncodeDispatchedDTO(string returnEventType)
: base(returnEventType)
{
}
}
// [Deprecated]
/// <summary>
/// Failure DTO
/// </summary>
/// <seealso cref="Gridwich.Core.DTO.ResponseEncodeStatusBaseDTO" />
public class ResponseEncodeFailureDTO : ResponseEncodeStatusBaseDTO
{
/// <summary>
/// Initializes a new instance of the <see cref="ResponseEncodeFailureDTO"/> class.
/// </summary>
public ResponseEncodeFailureDTO()
: base(CustomEventTypes.ResponseFailure)
{
}
}
/// <summary>
/// Output object
/// </summary>
[JsonObject(ItemRequired = Required.Always)]
public class Output
{
/// <summary>
/// Gets or sets the BLOB URI.
/// </summary>
/// <value>
/// The BLOB URI.
/// </value>
public object BlobUri { get; set; }
}
}