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

/**
 * Properties of the application rule protocol.
 *
 */
class AzureFirewallApplicationRuleProtocol {
  /**
   * Create a AzureFirewallApplicationRuleProtocol.
   * @property {string} [protocolType] Protocol type. Possible values include:
   * 'Http', 'Https'
   * @property {number} [port] Port number for the protocol, cannot be greater
   * than 64000. This field is optional.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AzureFirewallApplicationRuleProtocol
   *
   * @returns {object} metadata of AzureFirewallApplicationRuleProtocol
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureFirewallApplicationRuleProtocol',
      type: {
        name: 'Composite',
        className: 'AzureFirewallApplicationRuleProtocol',
        modelProperties: {
          protocolType: {
            required: false,
            serializedName: 'protocolType',
            type: {
              name: 'String'
            }
          },
          port: {
            required: false,
            serializedName: 'port',
            constraints: {
              InclusiveMaximum: 64000,
              InclusiveMinimum: 0
            },
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureFirewallApplicationRuleProtocol;
