"use strict";
/*
 * 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.NetworkStatusImpl = void 0;
const tslib_1 = require("tslib");
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
/** Class containing NetworkStatus operations. */
class NetworkStatusImpl {
    /**
     * Initialize a new instance of the class NetworkStatus class.
     * @param client Reference to the service client
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Gets the Connectivity Status to the external resources on which the Api Management service depends
     * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @param options The options parameters.
     */
    listByService(resourceGroupName, serviceName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serviceName, options }, listByServiceOperationSpec);
    }
    /**
     * Gets the Connectivity Status to the external resources on which the Api Management service depends
     * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @param locationName Location in which the API Management service is deployed. This is one of the
     *                     Azure Regions like West US, East US, South Central US.
     * @param options The options parameters.
     */
    listByLocation(resourceGroupName, serviceName, locationName, options) {
        return this.client.sendOperationRequest({ resourceGroupName, serviceName, locationName, options }, listByLocationOperationSpec);
    }
}
exports.NetworkStatusImpl = NetworkStatusImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByServiceOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: {
                type: {
                    name: "Sequence",
                    element: {
                        type: {
                            name: "Composite",
                            className: "NetworkStatusContractByLocation",
                        },
                    },
                },
            },
        },
        default: {
            bodyMapper: Mappers.ErrorResponse,
        },
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.serviceName,
    ],
    headerParameters: [Parameters.accept],
    serializer,
};
const listByLocationOperationSpec = {
    path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus",
    httpMethod: "GET",
    responses: {
        200: {
            bodyMapper: Mappers.NetworkStatusContract,
        },
        default: {
            bodyMapper: Mappers.ErrorResponse,
        },
    },
    queryParameters: [Parameters.apiVersion],
    urlParameters: [
        Parameters.$host,
        Parameters.resourceGroupName,
        Parameters.subscriptionId,
        Parameters.serviceName,
        Parameters.locationName,
    ],
    headerParameters: [Parameters.accept],
    serializer,
};
//# sourceMappingURL=networkStatus.js.map