text: /**
   * meraki
   *
   * This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
   */
  
  'use strict';
  
  const _request = require('../Http/Client/RequestClient');
  const _configuration = require('../configuration');
  const _apiHelper = require('../APIHelper');
  const _baseController = require('./BaseController');
  
  class MXL7ApplicationCategoriesController {
      /**
       * Return the L7 firewall application categories and their associated applications for an MX
       * network
       *
       * @param {string} networkId TODO: type description here
       *
       * @callback    The callback function that returns response from the API call
       *
       * @returns {Promise}
       */
      static getNetworkL7FirewallRulesApplicationCategories(networkId, callback) {
          // create empty callback if absent
          const _callback = typeof callback === 'function' ? callback : () => undefined;
  
          // validating required parameters
          if (networkId === null || networkId === undefined) {
              const _err = { errorMessage: 'The parameter `networkId` is a required parameter and cannot be null.',
                  errorCode: -1 };
              _callback(_err, null, null);
              return Promise.reject(_err);
          }
          // prepare query string for API call
          const _baseUri = _configuration.BASEURI;
  
          let _pathUrl = '/networks/{networkId}/l7FirewallRules/applicationCategories';
          // process template parameters
          _pathUrl = _apiHelper.appendUrlWithTemplateParameters(_pathUrl, {
              networkId,
          });
  
          const _queryBuilder = `${_baseUri}${_pathUrl}`;
  
          // validate and preprocess url
          const _queryUrl = _apiHelper.cleanUrl(_queryBuilder);
  
          // prepare headers
          const _headers = {
              accept: 'application/json',
              'X-Cisco-Meraki-API-Key': _configuration.xCiscoMerakiAPIKey,
          };
  
          // construct the request
          const _options = {
              queryUrl: _queryUrl,
              method: 'GET',
              headers: _headers,
          };
  
          // build the response processing.
          return new Promise((_fulfill, _reject) => {
              _request(_options, (_error, _response, _context) => {
                  let errorResponse;
                  if (_error) {
                      errorResponse = _baseController.validateResponse(_context);
                      _callback(errorResponse.error, errorResponse.response, errorResponse.context);
                      _reject(errorResponse.error);
                  } else if (_response.statusCode >= 200 && _response.statusCode <= 206) {
                      const parsed = JSON.parse(_response.body);
                      _callback(null, parsed, _context);
                      _fulfill(parsed);
                  } else {
                      errorResponse = _baseController.validateResponse(_context);
                      _callback(errorResponse.error, errorResponse.response, errorResponse.context);
                      _reject(errorResponse.error);
                  }
              });
          });
      }
  }
  module.exports = MXL7ApplicationCategoriesController;
  