/* 
  AUTOGENERATED FILE
  Run "npm run generateARMClients" to regenerate
  Edting this file directly should be done with extreme caution as not to diverge from ARM REST specs

  Generated from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-03-01/workspace.json
*/

import { configContext } from "../../../../ConfigContext";
import { armRequest } from "../../request";
import * as Types from "./types";
const apiVersion = "2021-03-01";

/* Gets a deleted sql pool that can be restored */
export async function get(
  subscriptionId: string,
  resourceGroupName: string,
  workspaceName: string,
  restorableDroppedSqlPoolId: string,
): Promise<Types.RestorableDroppedSqlPool> {
  const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.Synapse/workspaces/${workspaceName}/restorableDroppedSqlPools/${restorableDroppedSqlPoolId}`;
  return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
}

/* Gets a list of deleted Sql pools that can be restored */
export async function listByWorkspace(
  subscriptionId: string,
  resourceGroupName: string,
  workspaceName: string,
): Promise<Types.RestorableDroppedSqlPoolListResult> {
  const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.Synapse/workspaces/${workspaceName}/restorableDroppedSqlPools`;
  return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
}
