/// <summary>
 /// Update a variable.  (see
 /// http://aka.ms/azureautomationsdk/variableoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IVariableOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the update variable operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> UpdateAsync(this IVariableOperations operations, string automationAccount, VariableUpdateParameters parameters)
 {
     return(operations.UpdateAsync(automationAccount, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Update a variable.
 /// <see href="http://aka.ms/azureautomationsdk/variableoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='variableName'>
 /// The variable name.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update variable operation.
 /// </param>
 public static Variable Update(this IVariableOperations operations, string resourceGroupName, string automationAccountName, string variableName, VariableUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, variableName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a variable.  (see
 /// http://aka.ms/azureautomationsdk/variableoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IVariableOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the update variable operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Update(this IVariableOperations operations, string automationAccount, VariableUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVariableOperations)s).UpdateAsync(automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a variable.
 /// <see href="http://aka.ms/azureautomationsdk/variableoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='variableName'>
 /// The variable name.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update variable operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Variable> UpdateAsync(this IVariableOperations operations, string resourceGroupName, string automationAccountName, string variableName, VariableUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, variableName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }