@@ -59,6 +59,28 @@ public Complete AsComplete
5959 }
6060 }
6161
62+ /// <summary>
63+ /// <para>Gets a value indicating whether this instance is AsyncJobId</para>
64+ /// </summary>
65+ public bool IsAsyncJobId
66+ {
67+ get
68+ {
69+ return this is AsyncJobId ;
70+ }
71+ }
72+
73+ /// <summary>
74+ /// <para>Gets this instance as a AsyncJobId, or <c>null</c>.</para>
75+ /// </summary>
76+ public AsyncJobId AsAsyncJobId
77+ {
78+ get
79+ {
80+ return this as AsyncJobId ;
81+ }
82+ }
83+
6284 #region Encoder class
6385
6486 /// <summary>
@@ -79,6 +101,12 @@ public override void EncodeFields(LaunchEmptyResult value, enc.IJsonWriter write
79101 Complete . Encoder . EncodeFields ( ( Complete ) value , writer ) ;
80102 return ;
81103 }
104+ if ( value is AsyncJobId )
105+ {
106+ WriteProperty ( ".tag" , "async_job_id" , writer , enc . StringEncoder . Instance ) ;
107+ AsyncJobId . Encoder . EncodeFields ( ( AsyncJobId ) value , writer ) ;
108+ return ;
109+ }
82110 throw new sys . InvalidOperationException ( ) ;
83111 }
84112 }
@@ -113,6 +141,8 @@ protected override LaunchEmptyResult Decode(string tag, enc.IJsonReader reader)
113141 {
114142 case "complete" :
115143 return Complete . Decoder . DecodeFields ( reader ) ;
144+ case "async_job_id" :
145+ return AsyncJobId . Decoder . DecodeFields ( reader ) ;
116146 default :
117147 throw new sys . InvalidOperationException ( ) ;
118148 }
@@ -198,5 +228,102 @@ public override Complete DecodeFields(enc.IJsonReader reader)
198228
199229 #endregion
200230 }
231+
232+ /// <summary>
233+ /// <para>This response indicates that the processing is asynchronous. The string is an
234+ /// id that can be used to obtain the status of the asynchronous job.</para>
235+ /// </summary>
236+ public sealed class AsyncJobId : LaunchEmptyResult
237+ {
238+ #pragma warning disable 108
239+
240+ /// <summary>
241+ /// <para>The encoder instance.</para>
242+ /// </summary>
243+ internal static enc . StructEncoder < AsyncJobId > Encoder = new AsyncJobIdEncoder ( ) ;
244+
245+ /// <summary>
246+ /// <para>The decoder instance.</para>
247+ /// </summary>
248+ internal static enc . StructDecoder < AsyncJobId > Decoder = new AsyncJobIdDecoder ( ) ;
249+
250+ /// <summary>
251+ /// <para>Initializes a new instance of the <see cref="AsyncJobId" /> class.</para>
252+ /// </summary>
253+ /// <param name="value">The value</param>
254+ public AsyncJobId ( string value )
255+ {
256+ this . Value = value ;
257+ }
258+ /// <summary>
259+ /// <para>Initializes a new instance of the <see cref="AsyncJobId" /> class.</para>
260+ /// </summary>
261+ private AsyncJobId ( )
262+ {
263+ }
264+
265+ /// <summary>
266+ /// <para>Gets the value of this instance.</para>
267+ /// </summary>
268+ public string Value { get ; private set ; }
269+
270+ #region Encoder class
271+
272+ /// <summary>
273+ /// <para>Encoder for <see cref="AsyncJobId" />.</para>
274+ /// </summary>
275+ private class AsyncJobIdEncoder : enc . StructEncoder < AsyncJobId >
276+ {
277+ /// <summary>
278+ /// <para>Encode fields of given value.</para>
279+ /// </summary>
280+ /// <param name="value">The value.</param>
281+ /// <param name="writer">The writer.</param>
282+ public override void EncodeFields ( AsyncJobId value , enc . IJsonWriter writer )
283+ {
284+ WriteProperty ( "async_job_id" , value . Value , writer , enc . StringEncoder . Instance ) ;
285+ }
286+ }
287+
288+ #endregion
289+
290+ #region Decoder class
291+
292+ /// <summary>
293+ /// <para>Decoder for <see cref="AsyncJobId" />.</para>
294+ /// </summary>
295+ private class AsyncJobIdDecoder : enc . StructDecoder < AsyncJobId >
296+ {
297+ /// <summary>
298+ /// <para>Create a new instance of type <see cref="AsyncJobId" />.</para>
299+ /// </summary>
300+ /// <returns>The struct instance.</returns>
301+ protected override AsyncJobId Create ( )
302+ {
303+ return new AsyncJobId ( ) ;
304+ }
305+
306+ /// <summary>
307+ /// <para>Set given field.</para>
308+ /// </summary>
309+ /// <param name="value">The field value.</param>
310+ /// <param name="fieldName">The field name.</param>
311+ /// <param name="reader">The json reader.</param>
312+ protected override void SetField ( AsyncJobId value , string fieldName , enc . IJsonReader reader )
313+ {
314+ switch ( fieldName )
315+ {
316+ case "async_job_id" :
317+ value . Value = enc . StringDecoder . Instance . Decode ( reader ) ;
318+ break ;
319+ default :
320+ reader . Skip ( ) ;
321+ break ;
322+ }
323+ }
324+ }
325+
326+ #endregion
327+ }
201328 }
202329}
0 commit comments