/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

const msRest = require('ms-rest');
const msRestAzure = require('ms-rest-azure');
const WebResource = msRest.WebResource;


/**
 * Deletes the specified tap configuration from the NetworkInterface.
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {string} tapConfigurationName The name of the tap configuration.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {null} [result]   - The deserialized result object if an error did not occur.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _deleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }

  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Send request
  this.beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, parsedResult, httpRequest, response) => {
    if (err) return callback(err);

    let initialResult = new msRest.HttpOperationResponse();
    initialResult.request = httpRequest;
    initialResult.response = response;
    initialResult.body = response.body;
    client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
      if (err) return callback(err);

      // Create Result
      let result = null;

      httpRequest = pollingResult.request;
      response = pollingResult.response;
      let responseBody = pollingResult.body;
      if (responseBody === '') responseBody = null;

      // Deserialize Response

      return callback(null, result, httpRequest, response);
    });
  });
}

/**
 * Get the specified tap configuration on a network interface.
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {string} tapConfigurationName The name of the tap configuration.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {object} [result]   - The deserialized result object if an error did not occur.
 *                      See {@link NetworkInterfaceTapConfiguration} for more
 *                      information.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _get(resourceGroupName, networkInterfaceName, tapConfigurationName, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  let apiVersion = '2019-02-01';
  // Validate
  try {
    if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
      throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
    }
    if (networkInterfaceName === null || networkInterfaceName === undefined || typeof networkInterfaceName.valueOf() !== 'string') {
      throw new Error('networkInterfaceName cannot be null or undefined and it must be of type string.');
    }
    if (tapConfigurationName === null || tapConfigurationName === undefined || typeof tapConfigurationName.valueOf() !== 'string') {
      throw new Error('tapConfigurationName cannot be null or undefined and it must be of type string.');
    }
    if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
      throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
    }
    if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
      throw new Error('this.client.acceptLanguage must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  let baseUrl = this.client.baseUri;
  let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}';
  requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
  requestUrl = requestUrl.replace('{networkInterfaceName}', encodeURIComponent(networkInterfaceName));
  requestUrl = requestUrl.replace('{tapConfigurationName}', encodeURIComponent(tapConfigurationName));
  requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
  let queryParameters = [];
  queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }

  // Create HTTP transport objects
  let httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.url = requestUrl;
  httpRequest.headers = {};
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  if (this.client.generateClientRequestId) {
      httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
  }
  if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
    httpRequest.headers['accept-language'] = this.client.acceptLanguage;
  }
  if(options) {
    for(let headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  httpRequest.body = null;
  // Send Request
  return client.pipeline(httpRequest, (err, response, responseBody) => {
    if (err) {
      return callback(err);
    }
    let statusCode = response.statusCode;
    if (statusCode !== 200) {
      let error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = msRest.stripRequest(httpRequest);
      error.response = msRest.stripResponse(response);
      if (responseBody === '') responseBody = null;
      let parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        if (parsedErrorResponse) {
          if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
          if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
          if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
        }
        if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
          let resultMapper = new client.models['CloudError']().mapper();
          error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
        }
      } catch (defaultError) {
        error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
                         `- "${responseBody}" for the default response.`;
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    let result = null;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfiguration']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError.request = msRest.stripRequest(httpRequest);
        deserializationError.response = msRest.stripResponse(response);
        return callback(deserializationError);
      }
    }

    return callback(null, result, httpRequest, response);
  });
}


/**
 * Creates or updates a Tap configuration in the specified NetworkInterface.
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {string} tapConfigurationName The name of the tap configuration.
 *
 * @param {object} tapConfigurationParameters Parameters supplied to the create
 * or update tap configuration operation.
 *
 * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
 * of the Virtual Network Tap resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
 * The reference to the private IP Address of the collector nic that will
 * receive the tap
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
 * The reference to Virtual Network Taps.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
 * The reference of ApplicationGatewayBackendAddressPool resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
 * The reference of LoadBalancerBackendAddressPool resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
 * A list of references of LoadBalancerInboundNatRules.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
 * Private IP address of the IP configuration.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
 * The private IP address allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
 * Available from Api-Version 2016-03-30 onwards, it represents whether the
 * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
 * values include: 'IPv4', 'IPv6'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
 * Subnet bound to the IP configuration.
 *
 * @param {boolean}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
 * Gets whether this is a primary customer address on the network interface.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
 * Public IP address bound to the IP configuration.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
 * Application security groups in which the IP configuration is included.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
 * The provisioning state of the network interface IP configuration. Possible
 * values are: 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
 * Resource ID.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
 * The reference to the private IP address on the internal Load Balancer that
 * will receive the tap
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
 * The private IP address of the IP configuration.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
 * The Private IP allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
 * The reference of the subnet resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
 * The address prefix for the subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
 * List of  address prefixes for the subnet.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
 * The reference of the NetworkSecurityGroup resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
 * A collection of security rules of the network security group.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
 * The default security rules of network security group.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
 * The resource GUID property of the network security group resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
 * The provisioning state of the public IP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
 * The reference of the RouteTable resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
 * Collection of routes contained within a route table.
 *
 * @param {boolean}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
 * Gets or sets whether to disable the routes learned by BGP on that route
 * table. True means disable.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
 * The provisioning state of the resource. Possible values are: 'Updating',
 * 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
 * Gets a unique read-only string that changes whenever the resource is
 * updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
 * Nat gateway associated with this subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
 * An array of service endpoints.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
 * An array of service endpoint policies.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
 * Gets an array of references to the external resources using subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
 * Gets an array of references to services injecting into this subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
 * Gets an array of references to the delegations on the subnet.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
 * The provisioning state of the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
 * Resource ID.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
 * The reference of the Public IP resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
 * The public IP address SKU.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
 * Name of a public IP address SKU. Possible values include: 'Basic',
 * 'Standard'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
 * The public IP address allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
 * The public IP address version. Possible values include: 'IPv4', 'IPv6'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
 * The FQDN of the DNS record associated with the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
 * Gets or sets the Domain name label.The concatenation of the domain name
 * label and the regionalized DNS zone make up the fully qualified domain name
 * associated with the public IP address. If a domain name label is specified,
 * an A DNS record is created for the public IP in the Microsoft Azure DNS
 * system.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
 * Gets the FQDN, Fully qualified domain name of the A DNS record associated
 * with the public IP. This is the concatenation of the domainNameLabel and the
 * regionalized DNS zone.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
 * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
 * that resolves to this public IP address. If the reverseFqdn is specified,
 * then a PTR DNS record is created pointing from the IP address in the
 * in-addr.arpa domain to the reverse FQDN.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
 * The DDoS protection custom policy associated with the public IP address.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
 * The DDoS custom policy associated with the public IP.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
 * The DDoS protection policy customizability of the public IP. Only standard
 * coverage will have the ability to be customized. Possible values include:
 * 'Basic', 'Standard'
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
 * The list of tags associated with the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
 * The IP address associated with the public IP address resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
 * The Public IP Prefix this Public IP Address should be allocated from.
 *
 * @param {number}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
 * The idle timeout of the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
 * The resource GUID property of the public IP resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
 * The provisioning state of the PublicIP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
 * A list of availability zones denoting the IP allocated for the resource
 * needs to come from.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
 * The reference of the Public IP Prefix resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
 * Gets the provisioning state of the public IP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
 * A list of availability zones denoting the IP allocated for the resource
 * needs to come from.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
 * Resource ID.
 *
 * @param {number}
 * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
 * destination port that will receive the tapped traffic.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
 * unique read-only string that changes whenever the resource is updated.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
 * ID.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
 * Resource location.
 *
 * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
 * tags.
 *
 * @param {string} [tapConfigurationParameters.name] The name of the resource
 * that is unique within a resource group. This name can be used to access the
 * resource.
 *
 * @param {string} [tapConfigurationParameters.etag] A unique read-only string
 * that changes whenever the resource is updated.
 *
 * @param {string} [tapConfigurationParameters.id] Resource ID.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {object} [result]   - The deserialized result object if an error did not occur.
 *                      See {@link NetworkInterfaceTapConfiguration} for more
 *                      information.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }

  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Send request
  this.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, (err, parsedResult, httpRequest, response) => {
    if (err) return callback(err);

    let initialResult = new msRest.HttpOperationResponse();
    initialResult.request = httpRequest;
    initialResult.response = response;
    initialResult.body = response.body;
    client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
      if (err) return callback(err);

      // Create Result
      let result = null;

      httpRequest = pollingResult.request;
      response = pollingResult.response;
      let responseBody = pollingResult.body;
      if (responseBody === '') responseBody = null;

      // Deserialize Response
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfiguration']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError.request = msRest.stripRequest(httpRequest);
        deserializationError.response = msRest.stripResponse(response);
        return callback(deserializationError);
      }

      return callback(null, result, httpRequest, response);
    });
  });
}

/**
 * Get all Tap configurations in a network interface
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {object} [result]   - The deserialized result object if an error did not occur.
 *                      See {@link NetworkInterfaceTapConfigurationListResult}
 *                      for more information.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _list(resourceGroupName, networkInterfaceName, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  let apiVersion = '2019-02-01';
  // Validate
  try {
    if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
      throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
    }
    if (networkInterfaceName === null || networkInterfaceName === undefined || typeof networkInterfaceName.valueOf() !== 'string') {
      throw new Error('networkInterfaceName cannot be null or undefined and it must be of type string.');
    }
    if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
      throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
    }
    if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
      throw new Error('this.client.acceptLanguage must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  let baseUrl = this.client.baseUri;
  let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations';
  requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
  requestUrl = requestUrl.replace('{networkInterfaceName}', encodeURIComponent(networkInterfaceName));
  requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
  let queryParameters = [];
  queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }

  // Create HTTP transport objects
  let httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.url = requestUrl;
  httpRequest.headers = {};
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  if (this.client.generateClientRequestId) {
      httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
  }
  if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
    httpRequest.headers['accept-language'] = this.client.acceptLanguage;
  }
  if(options) {
    for(let headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  httpRequest.body = null;
  // Send Request
  return client.pipeline(httpRequest, (err, response, responseBody) => {
    if (err) {
      return callback(err);
    }
    let statusCode = response.statusCode;
    if (statusCode !== 200) {
      let error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = msRest.stripRequest(httpRequest);
      error.response = msRest.stripResponse(response);
      if (responseBody === '') responseBody = null;
      let parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        if (parsedErrorResponse) {
          if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
          if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
          if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
        }
        if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
          let resultMapper = new client.models['CloudError']().mapper();
          error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
        }
      } catch (defaultError) {
        error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
                         `- "${responseBody}" for the default response.`;
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    let result = null;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfigurationListResult']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError.request = msRest.stripRequest(httpRequest);
        deserializationError.response = msRest.stripResponse(response);
        return callback(deserializationError);
      }
    }

    return callback(null, result, httpRequest, response);
  });
}

/**
 * Deletes the specified tap configuration from the NetworkInterface.
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {string} tapConfigurationName The name of the tap configuration.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {null} [result]   - The deserialized result object if an error did not occur.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  let apiVersion = '2019-02-01';
  // Validate
  try {
    if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
      throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
    }
    if (networkInterfaceName === null || networkInterfaceName === undefined || typeof networkInterfaceName.valueOf() !== 'string') {
      throw new Error('networkInterfaceName cannot be null or undefined and it must be of type string.');
    }
    if (tapConfigurationName === null || tapConfigurationName === undefined || typeof tapConfigurationName.valueOf() !== 'string') {
      throw new Error('tapConfigurationName cannot be null or undefined and it must be of type string.');
    }
    if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
      throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
    }
    if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
      throw new Error('this.client.acceptLanguage must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  let baseUrl = this.client.baseUri;
  let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}';
  requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
  requestUrl = requestUrl.replace('{networkInterfaceName}', encodeURIComponent(networkInterfaceName));
  requestUrl = requestUrl.replace('{tapConfigurationName}', encodeURIComponent(tapConfigurationName));
  requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
  let queryParameters = [];
  queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }

  // Create HTTP transport objects
  let httpRequest = new WebResource();
  httpRequest.method = 'DELETE';
  httpRequest.url = requestUrl;
  httpRequest.headers = {};
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  if (this.client.generateClientRequestId) {
      httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
  }
  if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
    httpRequest.headers['accept-language'] = this.client.acceptLanguage;
  }
  if(options) {
    for(let headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  httpRequest.body = null;
  // Send Request
  return client.pipeline(httpRequest, (err, response, responseBody) => {
    if (err) {
      return callback(err);
    }
    let statusCode = response.statusCode;
    if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) {
      let error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = msRest.stripRequest(httpRequest);
      error.response = msRest.stripResponse(response);
      if (responseBody === '') responseBody = null;
      let parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        if (parsedErrorResponse) {
          if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
          if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
          if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
        }
        if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
          let resultMapper = new client.models['CloudError']().mapper();
          error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
        }
      } catch (defaultError) {
        error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
                         `- "${responseBody}" for the default response.`;
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    let result = null;
    if (responseBody === '') responseBody = null;

    return callback(null, result, httpRequest, response);
  });
}

/**
 * Creates or updates a Tap configuration in the specified NetworkInterface.
 *
 * @param {string} resourceGroupName The name of the resource group.
 *
 * @param {string} networkInterfaceName The name of the network interface.
 *
 * @param {string} tapConfigurationName The name of the tap configuration.
 *
 * @param {object} tapConfigurationParameters Parameters supplied to the create
 * or update tap configuration operation.
 *
 * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
 * of the Virtual Network Tap resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
 * The reference to the private IP Address of the collector nic that will
 * receive the tap
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
 * The reference to Virtual Network Taps.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
 * The reference of ApplicationGatewayBackendAddressPool resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
 * The reference of LoadBalancerBackendAddressPool resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
 * A list of references of LoadBalancerInboundNatRules.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
 * Private IP address of the IP configuration.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
 * The private IP address allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
 * Available from Api-Version 2016-03-30 onwards, it represents whether the
 * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
 * values include: 'IPv4', 'IPv6'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
 * Subnet bound to the IP configuration.
 *
 * @param {boolean}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
 * Gets whether this is a primary customer address on the network interface.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
 * Public IP address bound to the IP configuration.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
 * Application security groups in which the IP configuration is included.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
 * The provisioning state of the network interface IP configuration. Possible
 * values are: 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
 * Resource ID.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
 * The reference to the private IP address on the internal Load Balancer that
 * will receive the tap
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
 * The private IP address of the IP configuration.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
 * The Private IP allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
 * The reference of the subnet resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
 * The address prefix for the subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
 * List of  address prefixes for the subnet.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
 * The reference of the NetworkSecurityGroup resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
 * A collection of security rules of the network security group.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
 * The default security rules of network security group.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
 * The resource GUID property of the network security group resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
 * The provisioning state of the public IP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
 * The reference of the RouteTable resource.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
 * Collection of routes contained within a route table.
 *
 * @param {boolean}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
 * Gets or sets whether to disable the routes learned by BGP on that route
 * table. True means disable.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
 * The provisioning state of the resource. Possible values are: 'Updating',
 * 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
 * Gets a unique read-only string that changes whenever the resource is
 * updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
 * Nat gateway associated with this subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
 * An array of service endpoints.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
 * An array of service endpoint policies.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
 * Gets an array of references to the external resources using subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
 * Gets an array of references to services injecting into this subnet.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
 * Gets an array of references to the delegations on the subnet.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
 * The provisioning state of the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
 * Resource ID.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
 * The reference of the Public IP resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
 * The public IP address SKU.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
 * Name of a public IP address SKU. Possible values include: 'Basic',
 * 'Standard'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
 * The public IP address allocation method. Possible values include: 'Static',
 * 'Dynamic'
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
 * The public IP address version. Possible values include: 'IPv4', 'IPv6'
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
 * The FQDN of the DNS record associated with the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
 * Gets or sets the Domain name label.The concatenation of the domain name
 * label and the regionalized DNS zone make up the fully qualified domain name
 * associated with the public IP address. If a domain name label is specified,
 * an A DNS record is created for the public IP in the Microsoft Azure DNS
 * system.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
 * Gets the FQDN, Fully qualified domain name of the A DNS record associated
 * with the public IP. This is the concatenation of the domainNameLabel and the
 * regionalized DNS zone.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
 * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
 * that resolves to this public IP address. If the reverseFqdn is specified,
 * then a PTR DNS record is created pointing from the IP address in the
 * in-addr.arpa domain to the reverse FQDN.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
 * The DDoS protection custom policy associated with the public IP address.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
 * The DDoS custom policy associated with the public IP.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
 * The DDoS protection policy customizability of the public IP. Only standard
 * coverage will have the ability to be customized. Possible values include:
 * 'Basic', 'Standard'
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
 * The list of tags associated with the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
 * The IP address associated with the public IP address resource.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
 * The Public IP Prefix this Public IP Address should be allocated from.
 *
 * @param {number}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
 * The idle timeout of the public IP address.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
 * The resource GUID property of the public IP resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
 * The provisioning state of the PublicIP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
 * A list of availability zones denoting the IP allocated for the resource
 * needs to come from.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
 * Resource location.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
 * Resource tags.
 *
 * @param {object}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
 * The reference of the Public IP Prefix resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
 * Resource ID.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
 * Gets the provisioning state of the public IP resource. Possible values are:
 * 'Updating', 'Deleting', and 'Failed'.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
 * The name of the resource that is unique within a resource group. This name
 * can be used to access the resource.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
 * A unique read-only string that changes whenever the resource is updated.
 *
 * @param {array}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
 * A list of availability zones denoting the IP allocated for the resource
 * needs to come from.
 *
 * @param {string}
 * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
 * Resource ID.
 *
 * @param {number}
 * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
 * destination port that will receive the tapped traffic.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
 * unique read-only string that changes whenever the resource is updated.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
 * ID.
 *
 * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
 * Resource location.
 *
 * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
 * tags.
 *
 * @param {string} [tapConfigurationParameters.name] The name of the resource
 * that is unique within a resource group. This name can be used to access the
 * resource.
 *
 * @param {string} [tapConfigurationParameters.etag] A unique read-only string
 * that changes whenever the resource is updated.
 *
 * @param {string} [tapConfigurationParameters.id] Resource ID.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {object} [result]   - The deserialized result object if an error did not occur.
 *                      See {@link NetworkInterfaceTapConfiguration} for more
 *                      information.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  let apiVersion = '2019-02-01';
  // Validate
  try {
    if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
      throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
    }
    if (networkInterfaceName === null || networkInterfaceName === undefined || typeof networkInterfaceName.valueOf() !== 'string') {
      throw new Error('networkInterfaceName cannot be null or undefined and it must be of type string.');
    }
    if (tapConfigurationName === null || tapConfigurationName === undefined || typeof tapConfigurationName.valueOf() !== 'string') {
      throw new Error('tapConfigurationName cannot be null or undefined and it must be of type string.');
    }
    if (tapConfigurationParameters === null || tapConfigurationParameters === undefined) {
      throw new Error('tapConfigurationParameters cannot be null or undefined.');
    }
    if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
      throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
    }
    if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
      throw new Error('this.client.acceptLanguage must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  let baseUrl = this.client.baseUri;
  let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}';
  requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
  requestUrl = requestUrl.replace('{networkInterfaceName}', encodeURIComponent(networkInterfaceName));
  requestUrl = requestUrl.replace('{tapConfigurationName}', encodeURIComponent(tapConfigurationName));
  requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
  let queryParameters = [];
  queryParameters.push('api-version=' + encodeURIComponent(apiVersion));
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }

  // Create HTTP transport objects
  let httpRequest = new WebResource();
  httpRequest.method = 'PUT';
  httpRequest.url = requestUrl;
  httpRequest.headers = {};
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  if (this.client.generateClientRequestId) {
      httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
  }
  if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
    httpRequest.headers['accept-language'] = this.client.acceptLanguage;
  }
  if(options) {
    for(let headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Serialize Request
  let requestContent = null;
  let requestModel = null;
  try {
    if (tapConfigurationParameters !== null && tapConfigurationParameters !== undefined) {
      let requestModelMapper = new client.models['NetworkInterfaceTapConfiguration']().mapper();
      requestModel = client.serialize(requestModelMapper, tapConfigurationParameters, 'tapConfigurationParameters');
      requestContent = JSON.stringify(requestModel);
    }
  } catch (error) {
    let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
        `payload - ${JSON.stringify(tapConfigurationParameters, null, 2)}.`);
    return callback(serializationError);
  }
  httpRequest.body = requestContent;
  // Send Request
  return client.pipeline(httpRequest, (err, response, responseBody) => {
    if (err) {
      return callback(err);
    }
    let statusCode = response.statusCode;
    if (statusCode !== 200 && statusCode !== 201) {
      let error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = msRest.stripRequest(httpRequest);
      error.response = msRest.stripResponse(response);
      if (responseBody === '') responseBody = null;
      let parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        if (parsedErrorResponse) {
          if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
          if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
          if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
        }
        if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
          let resultMapper = new client.models['CloudError']().mapper();
          error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
        }
      } catch (defaultError) {
        error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
                         `- "${responseBody}" for the default response.`;
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    let result = null;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfiguration']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError.request = msRest.stripRequest(httpRequest);
        deserializationError.response = msRest.stripResponse(response);
        return callback(deserializationError);
      }
    }
    // Deserialize Response
    if (statusCode === 201) {
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfiguration']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError1.request = msRest.stripRequest(httpRequest);
        deserializationError1.response = msRest.stripResponse(response);
        return callback(deserializationError1);
      }
    }

    return callback(null, result, httpRequest, response);
  });
}

/**
 * Get all Tap configurations in a network interface
 *
 * @param {string} nextPageLink The NextLink from the previous successful call
 * to List operation.
 *
 * @param {object} [options] Optional Parameters.
 *
 * @param {object} [options.customHeaders] Headers that will be added to the
 * request
 *
 * @param {function} callback - The callback.
 *
 * @returns {function} callback(err, result, request, response)
 *
 *                      {Error}  err        - The Error object if an error occurred, null otherwise.
 *
 *                      {object} [result]   - The deserialized result object if an error did not occur.
 *                      See {@link NetworkInterfaceTapConfigurationListResult}
 *                      for more information.
 *
 *                      {object} [request]  - The HTTP Request object if an error did not occur.
 *
 *                      {stream} [response] - The HTTP Response stream if an error did not occur.
 */
function _listNext(nextPageLink, options, callback) {
   /* jshint validthis: true */
  let client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') {
      throw new Error('nextPageLink cannot be null or undefined and it must be of type string.');
    }
    if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
      throw new Error('this.client.acceptLanguage must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  let requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextPageLink);

  // Create HTTP transport objects
  let httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.url = requestUrl;
  httpRequest.headers = {};
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  if (this.client.generateClientRequestId) {
      httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
  }
  if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
    httpRequest.headers['accept-language'] = this.client.acceptLanguage;
  }
  if(options) {
    for(let headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  httpRequest.body = null;
  // Send Request
  return client.pipeline(httpRequest, (err, response, responseBody) => {
    if (err) {
      return callback(err);
    }
    let statusCode = response.statusCode;
    if (statusCode !== 200) {
      let error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = msRest.stripRequest(httpRequest);
      error.response = msRest.stripResponse(response);
      if (responseBody === '') responseBody = null;
      let parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        if (parsedErrorResponse) {
          if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
          if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
          if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
        }
        if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
          let resultMapper = new client.models['CloudError']().mapper();
          error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
        }
      } catch (defaultError) {
        error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
                         `- "${responseBody}" for the default response.`;
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    let result = null;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      let parsedResponse = null;
      try {
        parsedResponse = JSON.parse(responseBody);
        result = JSON.parse(responseBody);
        if (parsedResponse !== null && parsedResponse !== undefined) {
          let resultMapper = new client.models['NetworkInterfaceTapConfigurationListResult']().mapper();
          result = client.deserialize(resultMapper, parsedResponse, 'result');
        }
      } catch (error) {
        let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
        deserializationError.request = msRest.stripRequest(httpRequest);
        deserializationError.response = msRest.stripResponse(response);
        return callback(deserializationError);
      }
    }

    return callback(null, result, httpRequest, response);
  });
}

/** Class representing a NetworkInterfaceTapConfigurations. */
class NetworkInterfaceTapConfigurations {
  /**
   * Create a NetworkInterfaceTapConfigurations.
   * @param {NetworkManagementClient} client Reference to the service client.
   */
  constructor(client) {
    this.client = client;
    this._deleteMethod = _deleteMethod;
    this._get = _get;
    this._createOrUpdate = _createOrUpdate;
    this._list = _list;
    this._beginDeleteMethod = _beginDeleteMethod;
    this._beginCreateOrUpdate = _beginCreateOrUpdate;
    this._listNext = _listNext;
  }

  /**
   * Deletes the specified tap configuration from the NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<null>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  deleteMethodWithHttpOperationResponse(resourceGroupName, networkInterfaceName, tapConfigurationName, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._deleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Deletes the specified tap configuration from the NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {null} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {null} [result]   - The deserialized result object if an error did not occur.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  deleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._deleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._deleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback);
    }
  }

  /**
   * Get the specified tap configuration on a network interface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<NetworkInterfaceTapConfiguration>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  getWithHttpOperationResponse(resourceGroupName, networkInterfaceName, tapConfigurationName, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._get(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Get the specified tap configuration on a network interface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {NetworkInterfaceTapConfiguration} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {object} [result]   - The deserialized result object if an error did not occur.
   *                      See {@link NetworkInterfaceTapConfiguration} for more
   *                      information.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  get(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._get(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._get(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback);
    }
  }

  /**
   * Creates or updates a Tap configuration in the specified NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} tapConfigurationParameters Parameters supplied to the create
   * or update tap configuration operation.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
   * of the Virtual Network Tap resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
   * The reference to the private IP Address of the collector nic that will
   * receive the tap
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
   * The reference to Virtual Network Taps.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
   * The reference of ApplicationGatewayBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
   * The reference of LoadBalancerBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
   * A list of references of LoadBalancerInboundNatRules.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
   * Private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
   * The private IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
   * Available from Api-Version 2016-03-30 onwards, it represents whether the
   * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
   * values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
   * Subnet bound to the IP configuration.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
   * Gets whether this is a primary customer address on the network interface.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
   * Public IP address bound to the IP configuration.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
   * Application security groups in which the IP configuration is included.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
   * The provisioning state of the network interface IP configuration. Possible
   * values are: 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
   * The reference to the private IP address on the internal Load Balancer that
   * will receive the tap
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
   * The private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
   * The Private IP allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
   * The reference of the subnet resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
   * The address prefix for the subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
   * List of  address prefixes for the subnet.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
   * The reference of the NetworkSecurityGroup resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
   * A collection of security rules of the network security group.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
   * The default security rules of network security group.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
   * The resource GUID property of the network security group resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
   * The provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
   * The reference of the RouteTable resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
   * Collection of routes contained within a route table.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
   * Gets or sets whether to disable the routes learned by BGP on that route
   * table. True means disable.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
   * The provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
   * Gets a unique read-only string that changes whenever the resource is
   * updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
   * Nat gateway associated with this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
   * An array of service endpoints.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
   * An array of service endpoint policies.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
   * Gets an array of references to the external resources using subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
   * Gets an array of references to services injecting into this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
   * Gets an array of references to the delegations on the subnet.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
   * The provisioning state of the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
   * The reference of the Public IP resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
   * The public IP address SKU.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
   * Name of a public IP address SKU. Possible values include: 'Basic',
   * 'Standard'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
   * The public IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
   * The public IP address version. Possible values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
   * The FQDN of the DNS record associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
   * Gets or sets the Domain name label.The concatenation of the domain name
   * label and the regionalized DNS zone make up the fully qualified domain name
   * associated with the public IP address. If a domain name label is specified,
   * an A DNS record is created for the public IP in the Microsoft Azure DNS
   * system.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
   * Gets the FQDN, Fully qualified domain name of the A DNS record associated
   * with the public IP. This is the concatenation of the domainNameLabel and the
   * regionalized DNS zone.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
   * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
   * that resolves to this public IP address. If the reverseFqdn is specified,
   * then a PTR DNS record is created pointing from the IP address in the
   * in-addr.arpa domain to the reverse FQDN.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
   * The DDoS protection custom policy associated with the public IP address.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
   * The DDoS custom policy associated with the public IP.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
   * The DDoS protection policy customizability of the public IP. Only standard
   * coverage will have the ability to be customized. Possible values include:
   * 'Basic', 'Standard'
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
   * The list of tags associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
   * The IP address associated with the public IP address resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
   * The Public IP Prefix this Public IP Address should be allocated from.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
   * The idle timeout of the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
   * The resource GUID property of the public IP resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
   * The provisioning state of the PublicIP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
   * The reference of the Public IP Prefix resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
   * Gets the provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
   * Resource ID.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
   * destination port that will receive the tapped traffic.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
   * unique read-only string that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
   * ID.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
   * Resource location.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
   * tags.
   *
   * @param {string} [tapConfigurationParameters.name] The name of the resource
   * that is unique within a resource group. This name can be used to access the
   * resource.
   *
   * @param {string} [tapConfigurationParameters.etag] A unique read-only string
   * that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.id] Resource ID.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<NetworkInterfaceTapConfiguration>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  createOrUpdateWithHttpOperationResponse(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Creates or updates a Tap configuration in the specified NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} tapConfigurationParameters Parameters supplied to the create
   * or update tap configuration operation.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
   * of the Virtual Network Tap resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
   * The reference to the private IP Address of the collector nic that will
   * receive the tap
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
   * The reference to Virtual Network Taps.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
   * The reference of ApplicationGatewayBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
   * The reference of LoadBalancerBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
   * A list of references of LoadBalancerInboundNatRules.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
   * Private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
   * The private IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
   * Available from Api-Version 2016-03-30 onwards, it represents whether the
   * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
   * values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
   * Subnet bound to the IP configuration.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
   * Gets whether this is a primary customer address on the network interface.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
   * Public IP address bound to the IP configuration.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
   * Application security groups in which the IP configuration is included.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
   * The provisioning state of the network interface IP configuration. Possible
   * values are: 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
   * The reference to the private IP address on the internal Load Balancer that
   * will receive the tap
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
   * The private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
   * The Private IP allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
   * The reference of the subnet resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
   * The address prefix for the subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
   * List of  address prefixes for the subnet.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
   * The reference of the NetworkSecurityGroup resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
   * A collection of security rules of the network security group.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
   * The default security rules of network security group.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
   * The resource GUID property of the network security group resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
   * The provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
   * The reference of the RouteTable resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
   * Collection of routes contained within a route table.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
   * Gets or sets whether to disable the routes learned by BGP on that route
   * table. True means disable.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
   * The provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
   * Gets a unique read-only string that changes whenever the resource is
   * updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
   * Nat gateway associated with this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
   * An array of service endpoints.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
   * An array of service endpoint policies.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
   * Gets an array of references to the external resources using subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
   * Gets an array of references to services injecting into this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
   * Gets an array of references to the delegations on the subnet.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
   * The provisioning state of the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
   * The reference of the Public IP resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
   * The public IP address SKU.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
   * Name of a public IP address SKU. Possible values include: 'Basic',
   * 'Standard'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
   * The public IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
   * The public IP address version. Possible values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
   * The FQDN of the DNS record associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
   * Gets or sets the Domain name label.The concatenation of the domain name
   * label and the regionalized DNS zone make up the fully qualified domain name
   * associated with the public IP address. If a domain name label is specified,
   * an A DNS record is created for the public IP in the Microsoft Azure DNS
   * system.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
   * Gets the FQDN, Fully qualified domain name of the A DNS record associated
   * with the public IP. This is the concatenation of the domainNameLabel and the
   * regionalized DNS zone.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
   * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
   * that resolves to this public IP address. If the reverseFqdn is specified,
   * then a PTR DNS record is created pointing from the IP address in the
   * in-addr.arpa domain to the reverse FQDN.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
   * The DDoS protection custom policy associated with the public IP address.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
   * The DDoS custom policy associated with the public IP.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
   * The DDoS protection policy customizability of the public IP. Only standard
   * coverage will have the ability to be customized. Possible values include:
   * 'Basic', 'Standard'
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
   * The list of tags associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
   * The IP address associated with the public IP address resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
   * The Public IP Prefix this Public IP Address should be allocated from.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
   * The idle timeout of the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
   * The resource GUID property of the public IP resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
   * The provisioning state of the PublicIP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
   * The reference of the Public IP Prefix resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
   * Gets the provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
   * Resource ID.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
   * destination port that will receive the tapped traffic.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
   * unique read-only string that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
   * ID.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
   * Resource location.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
   * tags.
   *
   * @param {string} [tapConfigurationParameters.name] The name of the resource
   * that is unique within a resource group. This name can be used to access the
   * resource.
   *
   * @param {string} [tapConfigurationParameters.etag] A unique read-only string
   * that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.id] Resource ID.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {NetworkInterfaceTapConfiguration} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {object} [result]   - The deserialized result object if an error did not occur.
   *                      See {@link NetworkInterfaceTapConfiguration} for more
   *                      information.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._createOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, optionalCallback);
    }
  }

  /**
   * Get all Tap configurations in a network interface
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<NetworkInterfaceTapConfigurationListResult>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  listWithHttpOperationResponse(resourceGroupName, networkInterfaceName, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._list(resourceGroupName, networkInterfaceName, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Get all Tap configurations in a network interface
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {NetworkInterfaceTapConfigurationListResult} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {object} [result]   - The deserialized result object if an error did not occur.
   *                      See {@link NetworkInterfaceTapConfigurationListResult}
   *                      for more information.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  list(resourceGroupName, networkInterfaceName, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._list(resourceGroupName, networkInterfaceName, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._list(resourceGroupName, networkInterfaceName, options, optionalCallback);
    }
  }

  /**
   * Deletes the specified tap configuration from the NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<null>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  beginDeleteMethodWithHttpOperationResponse(resourceGroupName, networkInterfaceName, tapConfigurationName, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Deletes the specified tap configuration from the NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {null} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {null} [result]   - The deserialized result object if an error did not occur.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigurationName, options, optionalCallback);
    }
  }

  /**
   * Creates or updates a Tap configuration in the specified NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} tapConfigurationParameters Parameters supplied to the create
   * or update tap configuration operation.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
   * of the Virtual Network Tap resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
   * The reference to the private IP Address of the collector nic that will
   * receive the tap
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
   * The reference to Virtual Network Taps.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
   * The reference of ApplicationGatewayBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
   * The reference of LoadBalancerBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
   * A list of references of LoadBalancerInboundNatRules.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
   * Private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
   * The private IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
   * Available from Api-Version 2016-03-30 onwards, it represents whether the
   * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
   * values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
   * Subnet bound to the IP configuration.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
   * Gets whether this is a primary customer address on the network interface.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
   * Public IP address bound to the IP configuration.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
   * Application security groups in which the IP configuration is included.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
   * The provisioning state of the network interface IP configuration. Possible
   * values are: 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
   * The reference to the private IP address on the internal Load Balancer that
   * will receive the tap
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
   * The private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
   * The Private IP allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
   * The reference of the subnet resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
   * The address prefix for the subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
   * List of  address prefixes for the subnet.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
   * The reference of the NetworkSecurityGroup resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
   * A collection of security rules of the network security group.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
   * The default security rules of network security group.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
   * The resource GUID property of the network security group resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
   * The provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
   * The reference of the RouteTable resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
   * Collection of routes contained within a route table.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
   * Gets or sets whether to disable the routes learned by BGP on that route
   * table. True means disable.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
   * The provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
   * Gets a unique read-only string that changes whenever the resource is
   * updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
   * Nat gateway associated with this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
   * An array of service endpoints.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
   * An array of service endpoint policies.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
   * Gets an array of references to the external resources using subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
   * Gets an array of references to services injecting into this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
   * Gets an array of references to the delegations on the subnet.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
   * The provisioning state of the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
   * The reference of the Public IP resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
   * The public IP address SKU.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
   * Name of a public IP address SKU. Possible values include: 'Basic',
   * 'Standard'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
   * The public IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
   * The public IP address version. Possible values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
   * The FQDN of the DNS record associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
   * Gets or sets the Domain name label.The concatenation of the domain name
   * label and the regionalized DNS zone make up the fully qualified domain name
   * associated with the public IP address. If a domain name label is specified,
   * an A DNS record is created for the public IP in the Microsoft Azure DNS
   * system.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
   * Gets the FQDN, Fully qualified domain name of the A DNS record associated
   * with the public IP. This is the concatenation of the domainNameLabel and the
   * regionalized DNS zone.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
   * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
   * that resolves to this public IP address. If the reverseFqdn is specified,
   * then a PTR DNS record is created pointing from the IP address in the
   * in-addr.arpa domain to the reverse FQDN.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
   * The DDoS protection custom policy associated with the public IP address.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
   * The DDoS custom policy associated with the public IP.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
   * The DDoS protection policy customizability of the public IP. Only standard
   * coverage will have the ability to be customized. Possible values include:
   * 'Basic', 'Standard'
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
   * The list of tags associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
   * The IP address associated with the public IP address resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
   * The Public IP Prefix this Public IP Address should be allocated from.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
   * The idle timeout of the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
   * The resource GUID property of the public IP resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
   * The provisioning state of the PublicIP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
   * The reference of the Public IP Prefix resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
   * Gets the provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
   * Resource ID.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
   * destination port that will receive the tapped traffic.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
   * unique read-only string that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
   * ID.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
   * Resource location.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
   * tags.
   *
   * @param {string} [tapConfigurationParameters.name] The name of the resource
   * that is unique within a resource group. This name can be used to access the
   * resource.
   *
   * @param {string} [tapConfigurationParameters.etag] A unique read-only string
   * that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.id] Resource ID.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<NetworkInterfaceTapConfiguration>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Creates or updates a Tap configuration in the specified NetworkInterface.
   *
   * @param {string} resourceGroupName The name of the resource group.
   *
   * @param {string} networkInterfaceName The name of the network interface.
   *
   * @param {string} tapConfigurationName The name of the tap configuration.
   *
   * @param {object} tapConfigurationParameters Parameters supplied to the create
   * or update tap configuration operation.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference
   * of the Virtual Network Tap resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration]
   * The reference to the private IP Address of the collector nic that will
   * receive the tap
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.virtualNetworkTaps]
   * The reference to Virtual Network Taps.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationGatewayBackendAddressPools]
   * The reference of ApplicationGatewayBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerBackendAddressPools]
   * The reference of LoadBalancerBackendAddressPool resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.loadBalancerInboundNatRules]
   * A list of references of LoadBalancerInboundNatRules.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddress]
   * Private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAllocationMethod]
   * The private IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.privateIPAddressVersion]
   * Available from Api-Version 2016-03-30 onwards, it represents whether the
   * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible
   * values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet]
   * Subnet bound to the IP configuration.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.primary]
   * Gets whether this is a primary customer address on the network interface.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress]
   * Public IP address bound to the IP configuration.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.applicationSecurityGroups]
   * Application security groups in which the IP configuration is included.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.provisioningState]
   * The provisioning state of the network interface IP configuration. Possible
   * values are: 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration]
   * The reference to the private IP address on the internal Load Balancer that
   * will receive the tap
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAddress]
   * The private IP address of the IP configuration.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.privateIPAllocationMethod]
   * The Private IP allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet]
   * The reference of the subnet resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefix]
   * The address prefix for the subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.addressPrefixes]
   * List of  address prefixes for the subnet.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup]
   * The reference of the NetworkSecurityGroup resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.securityRules]
   * A collection of security rules of the network security group.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
   * The default security rules of network security group.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.resourceGuid]
   * The resource GUID property of the network security group resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.provisioningState]
   * The provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.networkSecurityGroup.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable]
   * The reference of the RouteTable resource.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.routes]
   * Collection of routes contained within a route table.
   *
   * @param {boolean}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.disableBgpRoutePropagation]
   * Gets or sets whether to disable the routes learned by BGP on that route
   * table. True means disable.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.provisioningState]
   * The provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.etag]
   * Gets a unique read-only string that changes whenever the resource is
   * updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.routeTable.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.natGateway]
   * Nat gateway associated with this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpoints]
   * An array of service endpoints.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceEndpointPolicies]
   * An array of service endpoint policies.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks]
   * Gets an array of references to the external resources using subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks]
   * Gets an array of references to services injecting into this subnet.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations]
   * Gets an array of references to the delegations on the subnet.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.provisioningState]
   * The provisioning state of the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.id]
   * Resource ID.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress]
   * The reference of the Public IP resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku]
   * The public IP address SKU.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.sku.name]
   * Name of a public IP address SKU. Possible values include: 'Basic',
   * 'Standard'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAllocationMethod]
   * The public IP address allocation method. Possible values include: 'Static',
   * 'Dynamic'
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPAddressVersion]
   * The public IP address version. Possible values include: 'IPv4', 'IPv6'
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings]
   * The FQDN of the DNS record associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel]
   * Gets or sets the Domain name label.The concatenation of the domain name
   * label and the regionalized DNS zone make up the fully qualified domain name
   * associated with the public IP address. If a domain name label is specified,
   * an A DNS record is created for the public IP in the Microsoft Azure DNS
   * system.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.fqdn]
   * Gets the FQDN, Fully qualified domain name of the A DNS record associated
   * with the public IP. This is the concatenation of the domainNameLabel and the
   * regionalized DNS zone.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn]
   * Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name
   * that resolves to this public IP address. If the reverseFqdn is specified,
   * then a PTR DNS record is created pointing from the IP address in the
   * in-addr.arpa domain to the reverse FQDN.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings]
   * The DDoS protection custom policy associated with the public IP address.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy]
   * The DDoS custom policy associated with the public IP.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
   * The DDoS protection policy customizability of the public IP. Only standard
   * coverage will have the ability to be customized. Possible values include:
   * 'Basic', 'Standard'
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipTags]
   * The list of tags associated with the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipAddress]
   * The IP address associated with the public IP address resource.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.publicIPPrefix]
   * The Public IP Prefix this Public IP Address should be allocated from.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.idleTimeoutInMinutes]
   * The idle timeout of the public IP address.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.resourceGuid]
   * The resource GUID property of the public IP resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.provisioningState]
   * The provisioning state of the PublicIP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.location]
   * Resource location.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.tags]
   * Resource tags.
   *
   * @param {object}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix]
   * The reference of the Public IP Prefix resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPPrefix.id]
   * Resource ID.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.provisioningState]
   * Gets the provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.name]
   * The name of the resource that is unique within a resource group. This name
   * can be used to access the resource.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.etag]
   * A unique read-only string that changes whenever the resource is updated.
   *
   * @param {array}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.zones]
   * A list of availability zones denoting the IP allocated for the resource
   * needs to come from.
   *
   * @param {string}
   * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.id]
   * Resource ID.
   *
   * @param {number}
   * [tapConfigurationParameters.virtualNetworkTap.destinationPort] The VXLAN
   * destination port that will receive the tapped traffic.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.etag] Gets a
   * unique read-only string that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.id] Resource
   * ID.
   *
   * @param {string} [tapConfigurationParameters.virtualNetworkTap.location]
   * Resource location.
   *
   * @param {object} [tapConfigurationParameters.virtualNetworkTap.tags] Resource
   * tags.
   *
   * @param {string} [tapConfigurationParameters.name] The name of the resource
   * that is unique within a resource group. This name can be used to access the
   * resource.
   *
   * @param {string} [tapConfigurationParameters.etag] A unique read-only string
   * that changes whenever the resource is updated.
   *
   * @param {string} [tapConfigurationParameters.id] Resource ID.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {NetworkInterfaceTapConfiguration} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {object} [result]   - The deserialized result object if an error did not occur.
   *                      See {@link NetworkInterfaceTapConfiguration} for more
   *                      information.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._beginCreateOrUpdate(resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options, optionalCallback);
    }
  }

  /**
   * Get all Tap configurations in a network interface
   *
   * @param {string} nextPageLink The NextLink from the previous successful call
   * to List operation.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @returns {Promise} A promise is returned
   *
   * @resolve {HttpOperationResponse<NetworkInterfaceTapConfigurationListResult>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
  listNextWithHttpOperationResponse(nextPageLink, options) {
    let client = this.client;
    let self = this;
    return new Promise((resolve, reject) => {
      self._listNext(nextPageLink, options, (err, result, request, response) => {
        let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
        httpOperationResponse.body = result;
        if (err) { reject(err); }
        else { resolve(httpOperationResponse); }
        return;
      });
    });
  }

  /**
   * Get all Tap configurations in a network interface
   *
   * @param {string} nextPageLink The NextLink from the previous successful call
   * to List operation.
   *
   * @param {object} [options] Optional Parameters.
   *
   * @param {object} [options.customHeaders] Headers that will be added to the
   * request
   *
   * @param {function} [optionalCallback] - The optional callback.
   *
   * @returns {function|Promise} If a callback was passed as the last parameter
   * then it returns the callback else returns a Promise.
   *
   * {Promise} A promise is returned
   *
   *                      @resolve {NetworkInterfaceTapConfigurationListResult} - The deserialized result object.
   *
   *                      @reject {Error} - The error object.
   *
   * {function} optionalCallback(err, result, request, response)
   *
   *                      {Error}  err        - The Error object if an error occurred, null otherwise.
   *
   *                      {object} [result]   - The deserialized result object if an error did not occur.
   *                      See {@link NetworkInterfaceTapConfigurationListResult}
   *                      for more information.
   *
   *                      {object} [request]  - The HTTP Request object if an error did not occur.
   *
   *                      {stream} [response] - The HTTP Response stream if an error did not occur.
   */
  listNext(nextPageLink, options, optionalCallback) {
    let client = this.client;
    let self = this;
    if (!optionalCallback && typeof options === 'function') {
      optionalCallback = options;
      options = null;
    }
    if (!optionalCallback) {
      return new Promise((resolve, reject) => {
        self._listNext(nextPageLink, options, (err, result, request, response) => {
          if (err) { reject(err); }
          else { resolve(result); }
          return;
        });
      });
    } else {
      return self._listNext(nextPageLink, options, optionalCallback);
    }
  }

}

module.exports = NetworkInterfaceTapConfigurations;
