/// <summary>
 /// Test the connectivity of a function for a stream analytics job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <returns>
 /// The test result of the input or output data source.
 /// </returns>
 public static ResourceTestConnectionResponse TestConnection(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFunctionOperations)s).TestConnectionAsync(resourceGroupName, jobName, functionName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a function for a stream analytics job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to update a function for a stream
 /// analytics job.
 /// </param>
 /// <returns>
 /// The response of the function patch operation.
 /// </returns>
 public static FunctionPatchResponse Patch(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName, FunctionPatchParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFunctionOperations)s).PatchAsync(resourceGroupName, jobName, functionName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the StreamAnalyticsManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public StreamAnalyticsManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._functions       = new FunctionOperations(this);
     this._inputs          = new InputOperations(this);
     this._streamingJobs   = new JobOperations(this);
     this._outputs         = new OutputOperations(this);
     this._subscriptions   = new SubscriptionOperations(this);
     this._transformations = new TransformationOperations(this);
     this._apiVersion      = "2015-09-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(60);
 }
 /// <summary>
 /// Test the connectivity of a function for a stream analytics job.
 /// Asynchronous call.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <returns>
 /// The test result of the input or output data source.
 /// </returns>
 public static Task <ResourceTestConnectionResponse> BeginTestConnectionAsync(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName)
 {
     return(operations.BeginTestConnectionAsync(resourceGroupName, jobName, functionName, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the default definition of a function for a stream
 /// analytics job. The raw json content will be used for the request
 /// body.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to retrieve the default
 /// definition of a function for a stream analytics job.
 /// </param>
 /// <returns>
 /// The response of the retrieve default function definition operation.
 /// </returns>
 public static Task <FunctionRetrieveDefaultDefinitionResponse> RetrieveDefaultDefinitionWithRawJsonContentAsync(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName, FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters parameters)
 {
     return(operations.RetrieveDefaultDefinitionWithRawJsonContentAsync(resourceGroupName, jobName, functionName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the default definition of a function for a stream
 /// analytics job. The raw json content will be used for the request
 /// body.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to retrieve the default
 /// definition of a function for a stream analytics job.
 /// </param>
 /// <returns>
 /// The response of the retrieve default function definition operation.
 /// </returns>
 public static FunctionRetrieveDefaultDefinitionResponse RetrieveDefaultDefinitionWithRawJsonContent(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName, FunctionRetrieveDefaultDefinitionWithRawJsonContentParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFunctionOperations)s).RetrieveDefaultDefinitionWithRawJsonContentAsync(resourceGroupName, jobName, functionName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a function for a stream analytics job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to update a function for a stream
 /// analytics job.
 /// </param>
 /// <returns>
 /// The response of the function patch operation.
 /// </returns>
 public static Task <FunctionPatchResponse> PatchAsync(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName, FunctionPatchParameters parameters)
 {
     return(operations.PatchAsync(resourceGroupName, jobName, functionName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Get a list of the functions defined in a stream analytics job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <returns>
 /// The response of the function list operation.
 /// </returns>
 public static Task <FunctionListResponse> ListFunctionsInJobAsync(this IFunctionOperations operations, string resourceGroupName, string jobName)
 {
     return(operations.ListFunctionsInJobAsync(resourceGroupName, jobName, CancellationToken.None));
 }
 /// <summary>
 /// Get a function for a stream analytics job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <returns>
 /// The response of the get stream analytics function operation.
 /// </returns>
 public static Task <FunctionGetResponse> GetAsync(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName)
 {
     return(operations.GetAsync(resourceGroupName, jobName, functionName, CancellationToken.None));
 }
 /// <summary>
 /// Create or update a function for a stream analytics job. The raw
 /// json content will be used.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.StreamAnalytics.IFunctionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the stream analytics job.
 /// </param>
 /// <param name='jobName'>
 /// Required. The name of the stream analytics job.
 /// </param>
 /// <param name='functionName'>
 /// Required. The name of the function for the stream analytics job.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a function
 /// for a stream analytics job.
 /// </param>
 /// <returns>
 /// The response of the function create or update operation.
 /// </returns>
 public static Task <FunctionCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(this IFunctionOperations operations, string resourceGroupName, string jobName, string functionName, FunctionCreateOrUpdateWithRawJsonContentParameters parameters)
 {
     return(operations.CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, jobName, functionName, parameters, CancellationToken.None));
 }