/// <summary> /// The user renews access token and refresh token /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='renewTokenRequest'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <AccessTokenResponse> RenewTokenAsync(this IFlightPredictionService operations, RenewTokenRequest renewTokenRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.RenewTokenWithHttpMessagesAsync(renewTokenRequest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The user revokes a refresh token /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='refreshToken'> /// The refresh token to be revoked /// </param> public static AccessTokenResponse RevokeRefreshToken(this IFlightPredictionService operations, string refreshToken) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).RevokeRefreshTokenAsync(refreshToken), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets a specific file from an execution in FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='index'> /// Index of the execution in the batch. /// </param> /// <param name='fileName'> /// Name of the file to be returned. /// </param> public static System.IO.Stream GetBatchExecutionFile(this IFlightPredictionService operations, string executionId, int index, string fileName) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).GetBatchExecutionFileAsync(executionId, index, fileName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets a specific file from an execution in FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='index'> /// Index of the execution in the batch. /// </param> /// <param name='fileName'> /// Name of the file to be returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <System.IO.Stream> GetBatchExecutionFileAsync(this IFlightPredictionService operations, string executionId, int index, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var _result = await operations.GetBatchExecutionFileWithHttpMessagesAsync(executionId, index, fileName, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// Gets all files from an individual execution in FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='index'> /// Index of the execution in the batch. /// </param> public static System.Collections.Generic.IList <string> GetBatchExecutionFiles(this IFlightPredictionService operations, string executionId, int index) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).GetBatchExecutionFilesAsync(executionId, index), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets all files from an individual execution in FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='index'> /// Index of the execution in the batch. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <System.Collections.Generic.IList <string> > GetBatchExecutionFilesAsync(this IFlightPredictionService operations, string executionId, int index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetBatchExecutionFilesWithHttpMessagesAsync(executionId, index, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all batch executions for FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='showPartialResults'> /// Returns the already processed results of the batch execution even if it /// hasn't been fully completed. /// </param> public static BatchWebServiceResult GetBatchExecutionStatus(this IFlightPredictionService operations, string executionId, bool?showPartialResults = default(bool?)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).GetBatchExecutionStatusAsync(executionId, showPartialResults), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets all batch executions for FlightPredictionService. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='executionId'> /// Execution id of the execution /// </param> /// <param name='showPartialResults'> /// Returns the already processed results of the batch execution even if it /// hasn't been fully completed. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <BatchWebServiceResult> GetBatchExecutionStatusAsync(this IFlightPredictionService operations, string executionId, bool?showPartialResults = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetBatchExecutionStatusWithHttpMessagesAsync(executionId, showPartialResults, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Logs the user in /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='loginRequest'> /// </param> public static AccessTokenResponse Login(this IFlightPredictionService operations, LoginRequest loginRequest) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).LoginAsync(loginRequest), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Consume the FlightPredictionService web service asynchronously. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='batchWebServiceParameters'> /// Input parameters to the web service. /// </param> /// <param name='parallelCount'> /// Number of threads used to process entries in the batch. Default value is /// 10. Please make sure not to use too high of a number because it might /// negatively impact performance. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <StartBatchExecutionResponse> StartBatchExecutionAsync(this IFlightPredictionService operations, System.Collections.Generic.IList <InputParameters> batchWebServiceParameters, int?parallelCount = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.StartBatchExecutionWithHttpMessagesAsync(batchWebServiceParameters, parallelCount, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Consume the FlightPredictionService web service asynchronously. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='batchWebServiceParameters'> /// Input parameters to the web service. /// </param> /// <param name='parallelCount'> /// Number of threads used to process entries in the batch. Default value is /// 10. Please make sure not to use too high of a number because it might /// negatively impact performance. /// </param> public static StartBatchExecutionResponse StartBatchExecution(this IFlightPredictionService operations, System.Collections.Generic.IList <InputParameters> batchWebServiceParameters, int?parallelCount = default(int?)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).StartBatchExecutionAsync(batchWebServiceParameters, parallelCount), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Consume the FlightPredictionService web service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='webServiceParameters'> /// Input parameters to the web service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <WebServiceResult> FlightPredictionAsync(this IFlightPredictionService operations, InputParameters webServiceParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.FlightPredictionWithHttpMessagesAsync(webServiceParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Consume the FlightPredictionService web service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='webServiceParameters'> /// Input parameters to the web service. /// </param> public static WebServiceResult FlightPrediction(this IFlightPredictionService operations, InputParameters webServiceParameters) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFlightPredictionService)s).FlightPredictionAsync(webServiceParameters), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }