/// <summary>
 /// Adds a protectable item to the replication protection container.
 /// </summary>
 /// <remarks>
 /// The operation to a add a protectable item to a protection container(Add
 /// physical server).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// The name of the fabric.
 /// </param>
 /// <param name='protectionContainerName'>
 /// The name of the protection container.
 /// </param>
 /// <param name='discoverProtectableItemRequest'>
 /// The request object to add a protectable item.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProtectionContainer> DiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, discoverProtectableItemRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the list of all protection containers in a vault.
 /// </summary>
 /// <remarks>
 /// Lists the protection containers in a 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 <ProtectionContainer> > ListNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Switches protection from one container to another or one replication
 /// provider to another.
 /// </summary>
 /// <remarks>
 /// Operation to switch protection from one container to another or one
 /// replication provider to another.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Unique fabric name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Protection container name.
 /// </param>
 /// <param name='switchInput'>
 /// Switch protection input.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProtectionContainer> BeginSwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, switchInput, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the protection container details.
 /// </summary>
 /// <remarks>
 /// Gets the details of a protection container.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Protection container name.
 /// </param>
 public static ProtectionContainer Get(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName)
 {
     return(operations.GetAsync(fabricName, protectionContainerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of all protection containers in a vault.
 /// </summary>
 /// <remarks>
 /// Lists the protection containers in a 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 <ProtectionContainer> ListNext(this IReplicationProtectionContainersOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Switches protection from one container to another or one replication
 /// provider to another.
 /// </summary>
 /// <remarks>
 /// Operation to switch protection from one container to another or one
 /// replication provider to another.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Unique fabric name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Protection container name.
 /// </param>
 /// <param name='switchInput'>
 /// Switch protection input.
 /// </param>
 public static ProtectionContainer BeginSwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput)
 {
     return(operations.BeginSwitchProtectionAsync(fabricName, protectionContainerName, switchInput).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Removes a protection container.
 /// </summary>
 /// <remarks>
 /// Operation to remove a protection container.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Unique fabric ARM name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Unique protection container ARM name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Removes a protection container.
 /// </summary>
 /// <remarks>
 /// Operation to remove a protection container.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Unique fabric ARM name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Unique protection container ARM name.
 /// </param>
 public static void BeginDelete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName)
 {
     operations.BeginDeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Adds a protectable item to the replication protection container.
 /// </summary>
 /// <remarks>
 /// The operation to a add a protectable item to a protection container(Add
 /// physical server).
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// The name of the fabric.
 /// </param>
 /// <param name='protectionContainerName'>
 /// The name of the protection container.
 /// </param>
 /// <param name='discoverProtectableItemRequest'>
 /// The request object to add a protectable item.
 /// </param>
 public static ProtectionContainer BeginDiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest)
 {
     return(operations.BeginDiscoverProtectableItemAsync(fabricName, protectionContainerName, discoverProtectableItemRequest).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a protection container.
 /// </summary>
 /// <remarks>
 /// Operation to create a protection container.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Unique fabric ARM name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Unique protection container ARM name.
 /// </param>
 /// <param name='creationInput'>
 /// Creation input.
 /// </param>
 public static ProtectionContainer BeginCreate(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput)
 {
     return(operations.BeginCreateAsync(fabricName, protectionContainerName, creationInput).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of protection container for a fabric.
 /// </summary>
 /// <remarks>
 /// Lists the protection containers in the specified fabric.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name.
 /// </param>
 public static IPage <ProtectionContainer> ListByReplicationFabrics(this IReplicationProtectionContainersOperations operations, string fabricName)
 {
     return(operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of all protection containers in a vault.
 /// </summary>
 /// <remarks>
 /// Lists the protection containers in a vault.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <ProtectionContainer> List(this IReplicationProtectionContainersOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }