/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers.js";
import * as Parameters from "../models/parameters.js";
/** Class containing WorkspaceApiExport operations. */
export class WorkspaceApiExportImpl {
    /**
     * Initialize a new instance of the class WorkspaceApiExport class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the details of the API specified by its identifier in the format specified to the Storage Blob
     * with SAS Key valid for 5 minutes.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @param workspaceId Workspace identifier. Must be unique in the current API Management service
     *                    instance.
     * @param apiId API revision identifier. Must be unique in the current API Management service instance.
     *              Non-current revision has ;rev=n as a suffix where n is the revision number.
     * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5
     *               minutes.
     * @param exportParam Query parameter required to export the API details.
     * @param options The options parameters.
     */
    get(resourceGroupName, serviceName, workspaceId, apiId, format, exportParam, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            serviceName,
            workspaceId,
            apiId,
            format,
            exportParam,
            options,
        }, getOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.ApiExportResult,
        },
        default: {
            bodyMapper: Mappers.ErrorResponse,
        },
    },
    queryParameters: [
        Parameters.apiVersion,
        Parameters.format1,
        Parameters.exportParam,
    ],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.serviceName,
        Parameters.apiId,
        Parameters.workspaceId,
    ],
    headerParameters: [Parameters.accept],
    serializer,
};
//# sourceMappingURL=workspaceApiExport.js.map