/// <summary>
 /// Provides the details of the backed up item. This is an asynchronous
 /// operation. To know the status of the operation,
 /// call the GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backed up item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backed up item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Backed up item name whose details are to be fetched.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProtectedItemResource> GetAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery <GetProtectedItemQueryObject> odataQuery = default(ODataQuery <GetProtectedItemQueryObject>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Enables backup of an item or to modifies the backup policy information of
 /// an already backed up item. This is an
 /// asynchronous operation. To know the status of the operation, call the
 /// GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backup item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backup item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Item name to be backed up.
 /// </param>
 /// <param name='parameters'>
 /// resource backed up item
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProtectedItemResource> CreateOrUpdateAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Provides the details of the backed up item. This is an asynchronous
 /// operation. To know the status of the operation,
 /// call the GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backed up item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backed up item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Backed up item name whose details are to be fetched.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static ProtectedItemResource Get(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery <GetProtectedItemQueryObject> odataQuery = default(ODataQuery <GetProtectedItemQueryObject>))
 {
     return(operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Used to disable backup of an item within a container. This is an
 /// asynchronous operation. To know the status of the
 /// request, call the GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backed up item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backed up item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Backed up item to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Used to disable backup of an item within a container. This is an
 /// asynchronous operation. To know the status of the
 /// request, call the GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backed up item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backed up item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Backed up item to be deleted.
 /// </param>
 public static void Delete(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName)
 {
     operations.DeleteAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Enables backup of an item or to modifies the backup policy information of
 /// an already backed up item. This is an
 /// asynchronous operation. To know the status of the operation, call the
 /// GetItemOperationResult API.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='vaultName'>
 /// The name of the recovery services vault.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group where the recovery services vault is
 /// present.
 /// </param>
 /// <param name='fabricName'>
 /// Fabric name associated with the backup item.
 /// </param>
 /// <param name='containerName'>
 /// Container name associated with the backup item.
 /// </param>
 /// <param name='protectedItemName'>
 /// Item name to be backed up.
 /// </param>
 /// <param name='parameters'>
 /// resource backed up item
 /// </param>
 public static void CreateOrUpdate(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters)
 {
     operations.CreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult();
 }