/*
 * 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 FirewallPolicyRuleCollectionGroupDrafts operations. */
export class FirewallPolicyRuleCollectionGroupDraftsImpl {
    client;
    /**
     * Initialize a new instance of the class FirewallPolicyRuleCollectionGroupDrafts class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Delete Rule Collection Group Draft.
     * @param resourceGroupName The name of the resource group.
     * @param firewallPolicyName The name of the Firewall Policy.
     * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup.
     * @param options The options parameters.
     */
    delete(resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            firewallPolicyName,
            ruleCollectionGroupName,
            options,
        }, deleteOperationSpec);
    }
    /**
     * Create or Update Rule Collection Group Draft.
     * @param resourceGroupName The name of the resource group.
     * @param firewallPolicyName The name of the Firewall Policy.
     * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup.
     * @param parameters Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup
     *                   operation.
     * @param options The options parameters.
     */
    createOrUpdate(resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            firewallPolicyName,
            ruleCollectionGroupName,
            parameters,
            options,
        }, createOrUpdateOperationSpec);
    }
    /**
     * Get Rule Collection Group Draft.
     * @param resourceGroupName The name of the resource group.
     * @param firewallPolicyName The name of the Firewall Policy.
     * @param ruleCollectionGroupName The name of the FirewallPolicyRuleCollectionGroup.
     * @param options The options parameters.
     */
    get(resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) {
        return this.client.sendOperationRequest({
            resourceGroupName,
            firewallPolicyName,
            ruleCollectionGroupName,
            options,
        }, getOperationSpec);
    }
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const deleteOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default",
    httpMethod: "DELETE",
    responses: {
        200: {},
        204: {},
        default: {
            bodyMapper: Mappers.CloudError,
        },
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.firewallPolicyName1,
        Parameters.ruleCollectionGroupName1,
    ],
    headerParameters: [Parameters.accept],
    serializer,
};
const createOrUpdateOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default",
    httpMethod: "PUT",
    responses: {
        200: {
            bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft,
        },
        201: {
            bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft,
        },
        default: {
            bodyMapper: Mappers.CloudError,
        },
    },
    requestBody: Parameters.parameters25,
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.firewallPolicyName1,
        Parameters.ruleCollectionGroupName1,
    ],
    headerParameters: [Parameters.accept, Parameters.contentType],
    mediaType: "json",
    serializer,
};
const getOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.FirewallPolicyRuleCollectionGroupDraft,
        },
        default: {
            bodyMapper: Mappers.CloudError,
        },
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.firewallPolicyName1,
        Parameters.ruleCollectionGroupName1,
    ],
    headerParameters: [Parameters.accept],
    serializer,
};
//# sourceMappingURL=firewallPolicyRuleCollectionGroupDrafts.js.map