/// <summary>
 /// Create or replace an existing Service Fabric. This operation can take a
 /// while to complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the service Fabric.
 /// </param>
 /// <param name='serviceFabric'>
 /// A Service Fabric.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceFabric> BeginCreateOrUpdateAsync(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, ServiceFabric serviceFabric, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, userName, name, serviceFabric, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create or replace an existing Service Fabric. This operation can take a
 /// while to complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='userName'>
 /// The name of the user profile.
 /// </param>
 /// <param name='name'>
 /// The name of the service Fabric.
 /// </param>
 /// <param name='serviceFabric'>
 /// A Service Fabric.
 /// </param>
 public static ServiceFabric BeginCreateOrUpdate(this IServiceFabricsOperations operations, string resourceGroupName, string labName, string userName, string name, ServiceFabric serviceFabric)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, userName, name, serviceFabric).GetAwaiter().GetResult());
 }