/// <summary>
 /// Gets the details of an ASR fabric.
 /// </summary>
 /// <remarks>
 /// Gets the details of an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Fabric> GetAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Renews certificate for the fabric.
 /// </summary>
 /// <remarks>
 /// Renews the connection certificate for the ASR replication fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// fabric name to renew certs for.
 /// </param>
 /// <param name='renewCertificate'>
 /// Renew certificate input.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Fabric> BeginRenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginRenewCertificateWithHttpMessagesAsync(fabricName, renewCertificate, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the list of ASR fabrics
 /// </summary>
 /// <remarks>
 /// Gets a list of the Azure Site Recovery fabrics in the vault.
 /// </remarks>
 /// <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 <Fabric> > ListNextAsync(this IReplicationFabricsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Perform failover of the process server.
 /// </summary>
 /// <remarks>
 /// The operation to move replications from a process server to another process
 /// server.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// The name of the fabric containing the process server.
 /// </param>
 /// <param name='failoverProcessServerRequest'>
 /// The input to the failover process server operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Fabric> BeginReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginReassociateGatewayWithHttpMessagesAsync(fabricName, failoverProcessServerRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the list of ASR fabrics
 /// </summary>
 /// <remarks>
 /// Gets a list of the Azure Site Recovery fabrics in the vault.
 /// </remarks>
 /// <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 <Fabric> ListNext(this IReplicationFabricsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the details of an ASR fabric.
 /// </summary>
 /// <remarks>
 /// Gets the details of an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 public static Fabric Get(this IReplicationFabricsOperations operations, string fabricName)
 {
     return(operations.GetAsync(fabricName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Renews certificate for the fabric.
 /// </summary>
 /// <remarks>
 /// Renews the connection certificate for the ASR replication fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// fabric name to renew certs for.
 /// </param>
 /// <param name='renewCertificate'>
 /// Renew certificate input.
 /// </param>
 public static Fabric BeginRenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate)
 {
     return(operations.BeginRenewCertificateAsync(fabricName, renewCertificate).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the site.
 /// </summary>
 /// <remarks>
 /// The operation to delete or remove an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// ASR fabric to delete
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes the site.
 /// </summary>
 /// <remarks>
 /// The operation to delete or remove an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// ASR fabric to delete
 /// </param>
 public static void BeginDelete(this IReplicationFabricsOperations operations, string fabricName)
 {
     operations.BeginDeleteAsync(fabricName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Migrates the site to AAD.
 /// </summary>
 /// <remarks>
 /// The operation to migrate an Azure Site Recovery fabric to AAD.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// ASR fabric to migrate.
 /// </param>
 public static void BeginMigrateToAad(this IReplicationFabricsOperations operations, string fabricName)
 {
     operations.BeginMigrateToAadAsync(fabricName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Perform failover of the process server.
 /// </summary>
 /// <remarks>
 /// The operation to move replications from a process server to another process
 /// server.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// The name of the fabric containing the process server.
 /// </param>
 /// <param name='failoverProcessServerRequest'>
 /// The input to the failover process server operation.
 /// </param>
 public static Fabric BeginReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest)
 {
     return(operations.BeginReassociateGatewayAsync(fabricName, failoverProcessServerRequest).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Checks the consistency of the ASR fabric.
 /// </summary>
 /// <remarks>
 /// The operation to perform a consistency check on the fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 public static Fabric BeginCheckConsistency(this IReplicationFabricsOperations operations, string fabricName)
 {
     return(operations.BeginCheckConsistencyAsync(fabricName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates an Azure Site Recovery fabric.
 /// </summary>
 /// <remarks>
 /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V
 /// site)
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Name of the ASR fabric.
 /// </param>
 /// <param name='input'>
 /// Fabric creation input.
 /// </param>
 public static Fabric BeginCreate(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInput input)
 {
     return(operations.BeginCreateAsync(fabricName, input).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of ASR fabrics
 /// </summary>
 /// <remarks>
 /// Gets a list of the Azure Site Recovery fabrics in the vault.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <Fabric> List(this IReplicationFabricsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Purges the site.
 /// </summary>
 /// <remarks>
 /// The operation to purge(force delete) an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// ASR fabric to purge.
 /// </param>
 public static void Purge(this IReplicationFabricsOperations operations, string fabricName)
 {
     operations.PurgeAsync(fabricName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the details of an ASR fabric.
 /// </summary>
 /// <remarks>
 /// Gets the details of an Azure Site Recovery fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static Fabric Get(this IReplicationFabricsOperations operations, string fabricName, ODataQuery <FabricQueryParameter> odataQuery = default(ODataQuery <FabricQueryParameter>))
 {
     return(operations.GetAsync(fabricName, odataQuery).GetAwaiter().GetResult());
 }