/// <summary>
 /// Gets the requested policy.
 /// </summary>
 /// <remarks>
 /// Gets the details of a replication policy.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='policyName'>
 /// Replication policy name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Policy> GetAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the list of replication policies.
 /// </summary>
 /// <remarks>
 /// Lists the replication policies for a vault.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Policy> > ListAsync(this IReplicationPoliciesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the requested policy.
 /// </summary>
 /// <remarks>
 /// Gets the details of a replication policy.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='policyName'>
 /// Replication policy name.
 /// </param>
 public static Policy Get(this IReplicationPoliciesOperations operations, string policyName)
 {
     return(operations.GetAsync(policyName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of replication policies.
 /// </summary>
 /// <remarks>
 /// Lists the replication policies for 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 <Policy> ListNext(this IReplicationPoliciesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates the policy.
 /// </summary>
 /// <remarks>
 /// The operation to update a replication policy.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='policyName'>
 /// Policy Id.
 /// </param>
 /// <param name='input'>
 /// Update Policy Input.
 /// </param>
 public static Policy BeginUpdate(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInput input)
 {
     return(operations.BeginUpdateAsync(policyName, input).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of replication policies.
 /// </summary>
 /// <remarks>
 /// Lists the replication policies for a vault.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <Policy> List(this IReplicationPoliciesOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the policy.
 /// </summary>
 /// <remarks>
 /// The operation to delete a replication policy.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='policyName'>
 /// Replication policy name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the policy.
 /// </summary>
 /// <remarks>
 /// The operation to delete a replication policy.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='policyName'>
 /// Replication policy name.
 /// </param>
 public static void BeginDelete(this IReplicationPoliciesOperations operations, string policyName)
 {
     operations.BeginDeleteAsync(policyName).GetAwaiter().GetResult();
 }