예제 #1
0
 /// <summary>
 /// Create a backup
 /// </summary>
 /// <remarks>
 /// Create a backup for the volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup
 /// </param>
 /// <param name='body'>
 /// Backup object supplied in the body of the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Backup> BeginCreateAsync(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, string backupName, Backup body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all the backups in a device. Can be used to get the backups for
 /// failover also.
 /// </summary>
 /// <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 <Backup> > ListByDeviceNextAsync(this IBackupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDeviceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #3
0
 /// <summary>
 /// List Backups
 /// </summary>
 /// <remarks>
 /// List all backups for a volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Backup> > ListAsync(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #4
0
 /// <summary>
 /// List all the backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServerBackup> GetAsync(this IBackupsOperations operations, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, backupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all the backups in a manager.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Backup> > ListByManagerAsync(this IBackupsOperations operations, string resourceGroupName, string managerName, ODataQuery <BackupFilter> odataQuery = default(ODataQuery <BackupFilter>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByManagerWithHttpMessagesAsync(resourceGroupName, managerName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations      = new Operations(this);
     BackupLocations = new BackupLocationsOperations(this);
     Backups         = new BackupsOperations(this);
     BaseUri         = new System.Uri("https://adminmanagement.local.azurestack.external");
     ApiVersion      = "2018-09-01";
     AcceptLanguage  = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
예제 #7
0
 /// <summary>
 /// Delete backup
 /// </summary>
 /// <remarks>
 /// Delete a backup of the volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, string backupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, poolName, volumeName, backupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #8
0
 /// <summary>
 /// List Backups
 /// </summary>
 /// <remarks>
 /// List all backups for a volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 public static IEnumerable <Backup> List(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName)
 {
     return(operations.ListAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns a backup from a location based on name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Name of the backup location.
 /// </param>
 /// <param name='backup'>
 /// Name of the backup.
 /// </param>
 public static Backup Get(this IBackupsOperations operations, string resourceGroupName, string location, string backup)
 {
     return(operations.GetAsync(resourceGroupName, location, backup).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves all the backups in a device. Can be used to get the backups for
 /// failover also.
 /// </summary>
 /// <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 <Backup> ListByDeviceNext(this IBackupsOperations operations, string nextPageLink)
 {
     return(operations.ListByDeviceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Clones the given backup element to a new disk or share with given details.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='elementName'>
 /// The backup element name.
 /// </param>
 /// <param name='cloneRequest'>
 /// The clone request.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginCloneAsync(this IBackupsOperations operations, string deviceName, string backupName, string elementName, CloneRequest cloneRequest, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginCloneWithHttpMessagesAsync(deviceName, backupName, elementName, cloneRequest, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes the backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static void BeginDelete(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName)
 {
     operations.BeginDeleteAsync(deviceName, backupName, resourceGroupName, managerName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Triggers backup for specified backed up item. This is an asynchronous
 /// operation. To know the status of the
 /// operation, call GetProtectedItemOperationResult 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'>
 /// Backup item for which backup needs to be triggered.
 /// </param>
 /// <param name='parameters'>
 /// resource backup request
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task TriggerAsync(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #14
0
 /// <summary>
 /// List all the backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 public static IPage <ServerBackup> ListByServer(this IBackupsOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult());
 }
예제 #15
0
 /// <summary>
 /// List all the backups for a given server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup.
 /// </param>
 public static ServerBackup Get(this IBackupsOperations operations, string resourceGroupName, string serverName, string backupName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, backupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Clones the backup element as a new volume.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='backupElementName'>
 /// The backup element name.
 /// </param>
 /// <param name='parameters'>
 /// The clone request object.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task CloneAsync(this IBackupsOperations operations, string deviceName, string backupName, string backupElementName, CloneRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.CloneWithHttpMessagesAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Clones the backup element as a new volume.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='backupElementName'>
 /// The backup element name.
 /// </param>
 /// <param name='parameters'>
 /// The clone request object.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static void Clone(this IBackupsOperations operations, string deviceName, string backupName, string backupElementName, CloneRequest parameters, string resourceGroupName, string managerName)
 {
     operations.CloneAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Triggers backup for specified backed up item. This is an asynchronous
 /// operation. To know the status of the
 /// operation, call GetProtectedItemOperationResult 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'>
 /// Backup item for which backup needs to be triggered.
 /// </param>
 /// <param name='parameters'>
 /// resource backup request
 /// </param>
 public static void Trigger(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters)
 {
     operations.TriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get volume's backup status
 /// </summary>
 /// <remarks>
 /// Get the status of the backup for a volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 public static BackupStatus GetStatus(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName)
 {
     return(operations.GetStatusAsync(resourceGroupName, accountName, poolName, volumeName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #21
0
 /// <summary>
 /// Patch a backup
 /// </summary>
 /// <remarks>
 /// Patch a backup for the volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup
 /// </param>
 /// <param name='body'>
 /// Backup object supplied in the body of the operation.
 /// </param>
 public static Backup Update(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, string backupName, BackupPatch body = default(BackupPatch))
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Clones the given backup element to a new disk or share with given details.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='backupName'>
 /// The backup name.
 /// </param>
 /// <param name='elementName'>
 /// The backup element name.
 /// </param>
 /// <param name='cloneRequest'>
 /// The clone request.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static void BeginClone(this IBackupsOperations operations, string deviceName, string backupName, string elementName, CloneRequest cloneRequest, string resourceGroupName, string managerName)
 {
     operations.BeginCloneAsync(deviceName, backupName, elementName, cloneRequest, resourceGroupName, managerName).GetAwaiter().GetResult();
 }
예제 #23
0
 /// <summary>
 /// Create a backup
 /// </summary>
 /// <remarks>
 /// Create a backup for the volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup
 /// </param>
 /// <param name='body'>
 /// Backup object supplied in the body of the operation.
 /// </param>
 public static Backup BeginCreate(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, string backupName, Backup body)
 {
     return(operations.BeginCreateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves all the backups in a manager.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Backup> ListByManager(this IBackupsOperations operations, string resourceGroupName, string managerName, ODataQuery <BackupFilter> odataQuery = default(ODataQuery <BackupFilter>))
 {
     return(operations.ListByManagerAsync(resourceGroupName, managerName, odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Restore a backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Name of the backup location.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='backup'>
 /// Name of the backup.
 /// </param>
 /// <param name='restoreOptions'>
 /// Restore options.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginRestoreAsync(this IBackupsOperations operations, string location, string resourceGroupName, string backup, RestoreOptions restoreOptions, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginRestoreWithHttpMessagesAsync(location, resourceGroupName, backup, restoreOptions, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #26
0
 /// <summary>
 /// Delete backup
 /// </summary>
 /// <remarks>
 /// Delete a backup of the volume
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the NetApp account
 /// </param>
 /// <param name='poolName'>
 /// The name of the capacity pool
 /// </param>
 /// <param name='volumeName'>
 /// The name of the volume
 /// </param>
 /// <param name='backupName'>
 /// The name of the backup
 /// </param>
 public static void BeginDelete(this IBackupsOperations operations, string resourceGroupName, string accountName, string poolName, string volumeName, string backupName)
 {
     operations.BeginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Returns a list of backups from a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Name of the backup location.
 /// </param>
 public static IEnumerable <Backup> List(this IBackupsOperations operations, string resourceGroupName, string location)
 {
     return(operations.ListAsync(resourceGroupName, location).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves all the backups in a device. Can be used to get the backups for
 /// failover also.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='forFailover'>
 /// Set to true if you need backups which can be used for failover.
 /// </param>
 public static IPage <Backup> ListByDevice(this IBackupsOperations operations, string deviceName, string resourceGroupName, string managerName, ODataQuery <BackupFilter> odataQuery = default(ODataQuery <BackupFilter>), bool?forFailover = default(bool?))
 {
     return(operations.ListByDeviceAsync(deviceName, resourceGroupName, managerName, odataQuery, forFailover).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Restore a backup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Name of the backup location.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='backup'>
 /// Name of the backup.
 /// </param>
 /// <param name='restoreOptions'>
 /// Restore options.
 /// </param>
 public static void BeginRestore(this IBackupsOperations operations, string location, string resourceGroupName, string backup, RestoreOptions restoreOptions)
 {
     operations.BeginRestoreAsync(location, resourceGroupName, backup, restoreOptions).GetAwaiter().GetResult();
 }