/// <param name='operations'>
 /// Reference to the Gilboy.Demo.Web.IUserOperations.
 /// </param>
 /// <param name='user'>
 /// Required.
 /// </param>
 public static object PostByUser(this IUserOperations operations, User user)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IUserOperations)s).PostByUserAsync(user);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public static IList<User> DeserializeJson(JToken inputObject)
 {
     IList<User> deserializedObject = new List<User>();
     foreach (JToken iListValue in ((JArray)inputObject))
     {
         User user = new User();
         user.DeserializeJson(iListValue);
         deserializedObject.Add(user);
     }
     return deserializedObject;
 }
 /// <param name='operations'>
 /// Reference to the Gilboy.Demo.Web.IUserOperations.
 /// </param>
 /// <param name='user'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<object> PostByUserAsync(this IUserOperations operations, User user, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<object> result = await operations.PostByUserWithOperationResponseAsync(user, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }