// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers.js";
import * as Parameters from "../models/parameters.js";
/** Class containing SqlVulnerabilityAssessmentBaselines operations. */
export class SqlVulnerabilityAssessmentBaselinesImpl {
    client;
    /**
     * Initialize a new instance of the class SqlVulnerabilityAssessmentBaselines class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Add a database's vulnerability assessment rule baseline list.
     * @param resourceGroupName The name of the resource group that contains the resource. You can obtain
     *                          this value from the Azure Resource Manager API or the portal.
     * @param serverName The name of the server.
     * @param vulnerabilityAssessmentName The name of the vulnerability assessment.
     * @param baselineName
     * @param parameters The requested rule baseline resource.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, parameters, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            serverName,
            vulnerabilityAssessmentName,
            baselineName,
            parameters,
            options,
        }, createOrUpdateOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOrUpdateOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSet,
        },
        default: {},
    },
    requestBody: Parameters.parameters90,
    queryParameters: [Parameters.apiVersion10, Parameters.systemDatabaseName],
    urlParameters: [
        Parameters.$host,
        Parameters.subscriptionId,
        Parameters.resourceGroupName,
        Parameters.serverName,
        Parameters.vulnerabilityAssessmentName,
        Parameters.baselineName1,
    ],
    headerParameters: [Parameters.contentType, Parameters.accept],
    mediaType: "json",
    serializer,
};
//# sourceMappingURL=sqlVulnerabilityAssessmentBaselines.js.map