/// <summary>
 /// Deserialize the object
 /// </summary>
 public static IList<Pilot> DeserializeJson(JToken inputObject)
 {
     IList<Pilot> deserializedObject = new List<Pilot>();
     foreach (JToken iListValue in ((JArray)inputObject))
     {
         Pilot pilot = new Pilot();
         pilot.DeserializeJson(iListValue);
         deserializedObject.Add(pilot);
     }
     return deserializedObject;
 }
 /// <param name='operations'>
 /// Reference to the DroneTrackerBackend.ApiApp.IPilots.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='pilot'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<object> PutPilotByIdAndPilotAsync(this IPilots operations, int id, Pilot pilot, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<object> result = await operations.PutPilotByIdAndPilotWithOperationResponseAsync(id, pilot, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }
 /// <param name='operations'>
 /// Reference to the DroneTrackerBackend.ApiApp.IPilots.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='pilot'>
 /// Required.
 /// </param>
 public static object PutPilotByIdAndPilot(this IPilots operations, int id, Pilot pilot)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IPilots)s).PutPilotByIdAndPilotAsync(id, pilot);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <param name='operations'>
 /// Reference to the DroneTrackerBackend.ApiApp.IPilots.
 /// </param>
 /// <param name='pilot'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<Pilot> PostPilotByPilotAsync(this IPilots operations, Pilot pilot, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<DroneTrackerBackend.ApiApp.Models.Pilot> result = await operations.PostPilotByPilotWithOperationResponseAsync(pilot, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }