/*
 * 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';

/**
 * Filter that is applied to packet capture request. Multiple filters can be
 * applied.
 *
 */
class PacketCaptureFilter {
  /**
   * Create a PacketCaptureFilter.
   * @property {string} [protocol] Protocol to be filtered on. Possible values
   * include: 'TCP', 'UDP', 'Any'. Default value: 'Any' .
   * @property {string} [localIPAddress] Local IP Address to be filtered on.
   * Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255"
   * for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges
   * not currently supported. Mixing ranges with multiple entries not currently
   * supported. Default = null.
   * @property {string} [remoteIPAddress] Local IP Address to be filtered on.
   * Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255"
   * for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges
   * not currently supported. Mixing ranges with multiple entries not currently
   * supported. Default = null.
   * @property {string} [localPort] Local port to be filtered on. Notation:
   * "80" for single port entry."80-85" for range. "80;443;" for multiple
   * entries. Multiple ranges not currently supported. Mixing ranges with
   * multiple entries not currently supported. Default = null.
   * @property {string} [remotePort] Remote port to be filtered on. Notation:
   * "80" for single port entry."80-85" for range. "80;443;" for multiple
   * entries. Multiple ranges not currently supported. Mixing ranges with
   * multiple entries not currently supported. Default = null.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PacketCaptureFilter
   *
   * @returns {object} metadata of PacketCaptureFilter
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PacketCaptureFilter',
      type: {
        name: 'Composite',
        className: 'PacketCaptureFilter',
        modelProperties: {
          protocol: {
            required: false,
            serializedName: 'protocol',
            defaultValue: 'Any',
            type: {
              name: 'String'
            }
          },
          localIPAddress: {
            required: false,
            serializedName: 'localIPAddress',
            type: {
              name: 'String'
            }
          },
          remoteIPAddress: {
            required: false,
            serializedName: 'remoteIPAddress',
            type: {
              name: 'String'
            }
          },
          localPort: {
            required: false,
            serializedName: 'localPort',
            type: {
              name: 'String'
            }
          },
          remotePort: {
            required: false,
            serializedName: 'remotePort',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PacketCaptureFilter;
