/*
 * 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 0.16.0.0
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the ApplicationGatewayRequestRoutingRule class.
 * @constructor
 * Request routing rule of application gateway
 * @member {string} [ruleType] Gets or sets the rule type. Possible values
 * include: 'Basic', 'PathBasedRouting'
 * 
 * @member {object} [backendAddressPool] Gets or sets backend address pool
 * resource of application gateway
 * 
 * @member {string} [backendAddressPool.id] Resource Id
 * 
 * @member {object} [backendHttpSettings] Gets or sets frontend port resource
 * of application gateway
 * 
 * @member {string} [backendHttpSettings.id] Resource Id
 * 
 * @member {object} [httpListener] Gets or sets http listener resource of
 * application gateway
 * 
 * @member {string} [httpListener.id] Resource Id
 * 
 * @member {object} [urlPathMap] Gets or sets url path map resource of
 * application gateway
 * 
 * @member {string} [urlPathMap.id] Resource Id
 * 
 * @member {string} [provisioningState] Gets or sets Provisioning state of the
 * request routing rule resource Updating/Deleting/Failed
 * 
 * @member {string} [name] Gets name of the resource that is unique within a
 * resource group. This name can be used to access the resource
 * 
 * @member {string} [etag] A unique read-only string that changes whenever the
 * resource is updated
 * 
 */
function ApplicationGatewayRequestRoutingRule() {
  ApplicationGatewayRequestRoutingRule['super_'].call(this);
}

util.inherits(ApplicationGatewayRequestRoutingRule, models['SubResource']);

/**
 * Defines the metadata of ApplicationGatewayRequestRoutingRule
 *
 * @returns {object} metadata of ApplicationGatewayRequestRoutingRule
 *
 */
ApplicationGatewayRequestRoutingRule.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'ApplicationGatewayRequestRoutingRule',
    type: {
      name: 'Composite',
      className: 'ApplicationGatewayRequestRoutingRule',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        ruleType: {
          required: false,
          serializedName: 'properties.ruleType',
          type: {
            name: 'String'
          }
        },
        backendAddressPool: {
          required: false,
          serializedName: 'properties.backendAddressPool',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        backendHttpSettings: {
          required: false,
          serializedName: 'properties.backendHttpSettings',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        httpListener: {
          required: false,
          serializedName: 'properties.httpListener',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        urlPathMap: {
          required: false,
          serializedName: 'properties.urlPathMap',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        provisioningState: {
          required: false,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        etag: {
          required: false,
          serializedName: 'etag',
          type: {
            name: 'String'
          }
        }
      }
    }
  };
};

module.exports = ApplicationGatewayRequestRoutingRule;
