/// <summary>
 /// Create or updates the usage connection
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.AzureStack.Management.IUsageConnectionsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Resource Group Name
 /// </param>
 /// <param name='usageConnectionId'>
 /// Required. Usage Connection Id
 /// </param>
 /// <param name='parameters'>
 /// Required. Usage Connections Create or Update Parameters
 /// </param>
 /// <returns>
 /// The usage connection create or update result.
 /// </returns>
 public static UsageConnectionsCreateOrUpdateResult CreateOrUpdate(this IUsageConnectionsOperations operations, string resourceGroupName, string usageConnectionId, UsageConnectionsCreateOrUpdateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IUsageConnectionsOperations)s).CreateOrUpdateAsync(resourceGroupName, usageConnectionId, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create or updates the usage connection
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.AzureStack.Management.IUsageConnectionsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Resource Group Name
 /// </param>
 /// <param name='usageConnectionId'>
 /// Required. Usage Connection Id
 /// </param>
 /// <param name='parameters'>
 /// Required. Usage Connections Create or Update Parameters
 /// </param>
 /// <returns>
 /// The usage connection create or update result.
 /// </returns>
 public static Task<UsageConnectionsCreateOrUpdateResult> CreateOrUpdateAsync(this IUsageConnectionsOperations operations, string resourceGroupName, string usageConnectionId, UsageConnectionsCreateOrUpdateParameters parameters)
 {
     return operations.CreateOrUpdateAsync(resourceGroupName, usageConnectionId, parameters, CancellationToken.None);
 }