/*
 * 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 an application rule.
 *
 */
class AzureFirewallApplicationRule {
  /**
   * Create a AzureFirewallApplicationRule.
   * @property {string} [name] Name of the application rule.
   * @property {string} [description] Description of the rule.
   * @property {array} [sourceAddresses] List of source IP addresses for this
   * rule.
   * @property {array} [protocols] Array of ApplicationRuleProtocols.
   * @property {array} [targetFqdns] List of FQDNs for this rule.
   * @property {array} [fqdnTags] List of FQDN Tags for this rule.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AzureFirewallApplicationRule
   *
   * @returns {object} metadata of AzureFirewallApplicationRule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureFirewallApplicationRule',
      type: {
        name: 'Composite',
        className: 'AzureFirewallApplicationRule',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          sourceAddresses: {
            required: false,
            serializedName: 'sourceAddresses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          protocols: {
            required: false,
            serializedName: 'protocols',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AzureFirewallApplicationRuleProtocolElementType',
                  type: {
                    name: 'Composite',
                    className: 'AzureFirewallApplicationRuleProtocol'
                  }
              }
            }
          },
          targetFqdns: {
            required: false,
            serializedName: 'targetFqdns',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          fqdnTags: {
            required: false,
            serializedName: 'fqdnTags',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = AzureFirewallApplicationRule;
