/// <summary>
 /// Directly creates a file with the specified content, without
 /// requiring a redirect. This API is NOT webhdfs compliant. It should
 /// be used only by tools that do not rely on webhdfs interoperability.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to create.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Store account to create the
 /// file in
 /// </param>
 /// <param name='streamContents'>
 /// Required. The file contents to include when creating the file. This
 /// parameter is required, however it can be an empty stream. Just not
 /// null.
 /// </param>
 /// <param name='parameters'>
 /// Optional. The optional parameters to use when creating the file
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<AzureOperationResponse> DirectCreateAsync(this IFileSystemOperations operations, string filePath, string accountName, Stream streamContents, FileCreateParameters parameters)
 {
     return operations.DirectCreateAsync(filePath, accountName, streamContents, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Initiates a file creation request, resulting in a return of the
 /// data node location that will service the request.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to create.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Store account to create the
 /// file in
 /// </param>
 /// <param name='parameters'>
 /// Optional. The optional parameters to use when creating the file
 /// </param>
 /// <returns>
 /// The response recieved after the BeginOpen, BeginCreate and
 /// BeginAppend requests.
 /// </returns>
 public static Task<FileCreateOpenAndAppendResponse> BeginCreateAsync(this IFileSystemOperations operations, string filePath, string accountName, FileCreateParameters parameters)
 {
     return operations.BeginCreateAsync(filePath, accountName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Directly creates a file with the specified content, without
 /// requiring a redirect. This API is NOT webhdfs compliant. It should
 /// be used only by tools that do not rely on webhdfs interoperability.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to create.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Store account to create the
 /// file in
 /// </param>
 /// <param name='streamContents'>
 /// Required. The file contents to include when creating the file. This
 /// parameter is required, however it can be an empty stream. Just not
 /// null.
 /// </param>
 /// <param name='parameters'>
 /// Optional. The optional parameters to use when creating the file
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse DirectCreate(this IFileSystemOperations operations, string filePath, string accountName, Stream streamContents, FileCreateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IFileSystemOperations)s).DirectCreateAsync(filePath, accountName, streamContents, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Initiates a file creation request, resulting in a return of the
 /// data node location that will service the request.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to create.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Store account to create the
 /// file in
 /// </param>
 /// <param name='parameters'>
 /// Optional. The optional parameters to use when creating the file
 /// </param>
 /// <returns>
 /// The response recieved after the BeginOpen, BeginCreate and
 /// BeginAppend requests.
 /// </returns>
 public static FileCreateOpenAndAppendResponse BeginCreate(this IFileSystemOperations operations, string filePath, string accountName, FileCreateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IFileSystemOperations)s).BeginCreateAsync(filePath, accountName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }