/// <summary>
 /// Creates a function or replaces an already existing function under an
 /// existing streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='function'>
 /// The definition of the function that will be used to create a new function
 /// or replace the existing one under the streaming job.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='ifMatch'>
 /// The ETag of the function. Omit this value to always overwrite the current
 /// function. Specify the last-seen ETag value to prevent accidentally
 /// overwriting concurrent changes.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Set to '*' to allow a new function to be created, but to prevent updating
 /// an existing function. Other values will result in a 412 Pre-condition
 /// Failed response.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Function> CreateOrReplaceAsync(this IFunctionsOperations operations, Function function, string resourceGroupName, string jobName, string functionName, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrReplaceWithHttpMessagesAsync(function, resourceGroupName, jobName, functionName, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Tests if the information provided for a function is valid. This can range
 /// from testing the connection to the underlying web service behind the
 /// function or making sure the function code provided is syntactically
 /// correct.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='function'>
 /// If the function specified does not already exist, this parameter must
 /// contain the full function definition intended to be tested. If the function
 /// specified already exists, this parameter can be left null to test the
 /// existing function as is or if specified, the properties specified will
 /// overwrite the corresponding properties in the existing function (exactly
 /// like a PATCH operation) and the resulting function will be tested.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceTestStatus> BeginTestAsync(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName, Function function = default(Function), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginTestWithHttpMessagesAsync(resourceGroupName, jobName, functionName, function, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the functions under the specified streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Function> > ListByStreamingJobNextAsync(this IFunctionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByStreamingJobNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves the default definition of a function based on the parameters
 /// specified.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='functionRetrieveDefaultDefinitionParameters'>
 /// Parameters used to specify the type of function to retrieve the default
 /// definition for.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Function> RetrieveDefaultDefinitionAsync(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName, FunctionRetrieveDefaultDefinitionParameters functionRetrieveDefaultDefinitionParameters = default(FunctionRetrieveDefaultDefinitionParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RetrieveDefaultDefinitionWithHttpMessagesAsync(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the functions under the specified streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='select'>
 /// The $select OData query parameter. This is a comma-separated list of
 /// structural properties to include in the response, or "*" to include all
 /// properties. By default, all properties are returned except diagnostics.
 /// Currently only accepts '*' as a valid value.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Function> > ListByStreamingJobAsync(this IFunctionsOperations operations, string resourceGroupName, string jobName, string select = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByStreamingJobWithHttpMessagesAsync(resourceGroupName, jobName, select, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a function or replaces an already existing function under an
 /// existing streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='function'>
 /// The definition of the function that will be used to create a new function
 /// or replace the existing one under the streaming job.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='ifMatch'>
 /// The ETag of the function. Omit this value to always overwrite the current
 /// function. Specify the last-seen ETag value to prevent accidentally
 /// overwriting concurrent changes.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Set to '*' to allow a new function to be created, but to prevent updating
 /// an existing function. Other values will result in a 412 Pre-condition
 /// Failed response.
 /// </param>
 public static Function CreateOrReplace(this IFunctionsOperations operations, Function function, string resourceGroupName, string jobName, string functionName, string ifMatch = default(string), string ifNoneMatch = default(string))
 {
     return(operations.CreateOrReplaceAsync(function, resourceGroupName, jobName, functionName, ifMatch, ifNoneMatch).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the functions under the specified streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Function> ListByStreamingJobNext(this IFunctionsOperations operations, string nextPageLink)
 {
     return(operations.ListByStreamingJobNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Tests if the information provided for a function is valid. This can range
 /// from testing the connection to the underlying web service behind the
 /// function or making sure the function code provided is syntactically
 /// correct.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='function'>
 /// If the function specified does not already exist, this parameter must
 /// contain the full function definition intended to be tested. If the function
 /// specified already exists, this parameter can be left null to test the
 /// existing function as is or if specified, the properties specified will
 /// overwrite the corresponding properties in the existing function (exactly
 /// like a PATCH operation) and the resulting function will be tested.
 /// </param>
 public static ResourceTestStatus BeginTest(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName, Function function = default(Function))
 {
     return(operations.BeginTestAsync(resourceGroupName, jobName, functionName, function).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves the default definition of a function based on the parameters
 /// specified.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='functionRetrieveDefaultDefinitionParameters'>
 /// Parameters used to specify the type of function to retrieve the default
 /// definition for.
 /// </param>
 public static Function RetrieveDefaultDefinition(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName, FunctionRetrieveDefaultDefinitionParameters functionRetrieveDefaultDefinitionParameters = default(FunctionRetrieveDefaultDefinitionParameters))
 {
     return(operations.RetrieveDefaultDefinitionAsync(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the functions under the specified streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='select'>
 /// The $select OData query parameter. This is a comma-separated list of
 /// structural properties to include in the response, or "*" to include all
 /// properties. By default, all properties are returned except diagnostics.
 /// Currently only accepts '*' as a valid value.
 /// </param>
 public static IPage <Function> ListByStreamingJob(this IFunctionsOperations operations, string resourceGroupName, string jobName, string select = default(string))
 {
     return(operations.ListByStreamingJobAsync(resourceGroupName, jobName, select).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets details about the specified function.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 public static Function Get(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName)
 {
     return(operations.GetAsync(resourceGroupName, jobName, functionName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a function from the streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, jobName, functionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes a function from the streaming job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 public static void Delete(this IFunctionsOperations operations, string resourceGroupName, string jobName, string functionName)
 {
     operations.DeleteAsync(resourceGroupName, jobName, functionName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Updates an existing function under an existing streaming job. This can be
 /// used to partially update (ie. update one or two properties) a function
 /// without affecting the rest the job or function definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='function'>
 /// A function object. The properties specified here will overwrite the
 /// corresponding properties in the existing function (ie. Those properties
 /// will be updated). Any properties that are set to null here will mean that
 /// the corresponding property in the existing function will remain the same
 /// and not change as a result of this PATCH operation.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='jobName'>
 /// The name of the streaming job.
 /// </param>
 /// <param name='functionName'>
 /// The name of the function.
 /// </param>
 /// <param name='ifMatch'>
 /// The ETag of the function. Omit this value to always overwrite the current
 /// function. Specify the last-seen ETag value to prevent accidentally
 /// overwriting concurrent changes.
 /// </param>
 public static Function Update(this IFunctionsOperations operations, Function function, string resourceGroupName, string jobName, string functionName, string ifMatch = default(string))
 {
     return(operations.UpdateAsync(function, resourceGroupName, jobName, functionName, ifMatch).GetAwaiter().GetResult());
 }