/// <summary>
 /// Fetches the status of an operation such as triggering a backup, restore.
 /// The status can be in progress, completed
 /// or failed. You can refer to the OperationStatus enum for all the possible
 /// states of the operation. Some operations
 /// create jobs. This method returns the list of jobs associated with the
 /// operation.
 /// </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'>
 /// Backup item name whose details are to be fetched.
 /// </param>
 /// <param name='operationId'>
 /// OperationID represents the operation whose status needs to be fetched.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationStatus> GetAsync(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Fetches the status of an operation such as triggering a backup, restore.
 /// The status can be in progress, completed
 /// or failed. You can refer to the OperationStatus enum for all the possible
 /// states of the operation. Some operations
 /// create jobs. This method returns the list of jobs associated with the
 /// operation.
 /// </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'>
 /// Backup item name whose details are to be fetched.
 /// </param>
 /// <param name='operationId'>
 /// OperationID represents the operation whose status needs to be fetched.
 /// </param>
 public static OperationStatus Get(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId)
 {
     return(operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId).GetAwaiter().GetResult());
 }