public override void ExecuteCmdlet()
 {
     base.ExecuteCmdlet();
     RestoreRequest request = new RestoreRequest()
     {
         Location = "",
         StorageAccountUrl = this.StorageAccountUrl,
         BlobName = this.BlobName,
         SiteName = CmdletHelpers.GenerateSiteWithSlotName(Name, Slot),
         Overwrite = this.Overwrite.IsPresent,
         IgnoreConflictingHostNames = this.IgnoreConflictingHostNames.IsPresent,
         Databases = this.Databases,
         OperationType = BackupRestoreOperationType.Default
     };
     // The id here does not actually matter. It is an artifact of the CSM API requirements. It should be possible
     // to restore from a backup that is no longer stored in our Backups table.
     WebsitesClient.RestoreSite(ResourceGroupName, Name, Slot, "1", request);
 }
 public RestoreResponse RestoreSite(string resourceGroupName, string webSiteName, string slotName,
     string backupId, RestoreRequest request)
 {
     string qualifiedSiteName;
     var useSlot = CmdletHelpers.ShouldUseDeploymentSlot(webSiteName, slotName, out qualifiedSiteName);
     if (useSlot)
     {
         return WrappedWebsitesClient.Sites.RestoreSiteSlot(resourceGroupName, webSiteName, backupId, request, slotName);
     }
     else
     {
         return WrappedWebsitesClient.Sites.RestoreSite(resourceGroupName, webSiteName, backupId, request);
     }
 }