/*
 * 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 models = require('./index');

/**
 * Application gateway resource
 *
 * @extends models['Resource']
 */
class ApplicationGateway extends models['Resource'] {
  /**
   * Create a ApplicationGateway.
   * @property {object} [sku] SKU of the application gateway resource.
   * @property {string} [sku.name] Name of an application gateway SKU. Possible
   * values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large',
   * 'WAF_Medium', 'WAF_Large', 'Standard_v2', 'WAF_v2'
   * @property {string} [sku.tier] Tier of an application gateway. Possible
   * values include: 'Standard', 'WAF', 'Standard_v2', 'WAF_v2'
   * @property {number} [sku.capacity] Capacity (instance count) of an
   * application gateway.
   * @property {object} [sslPolicy] SSL policy of the application gateway
   * resource.
   * @property {array} [sslPolicy.disabledSslProtocols] Ssl protocols to be
   * disabled on application gateway.
   * @property {string} [sslPolicy.policyType] Type of Ssl Policy. Possible
   * values include: 'Predefined', 'Custom'
   * @property {string} [sslPolicy.policyName] Name of Ssl predefined policy.
   * Possible values include: 'AppGwSslPolicy20150501',
   * 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
   * @property {array} [sslPolicy.cipherSuites] Ssl cipher suites to be enabled
   * in the specified order to application gateway.
   * @property {string} [sslPolicy.minProtocolVersion] Minimum version of Ssl
   * protocol to be supported on application gateway. Possible values include:
   * 'TLSv1_0', 'TLSv1_1', 'TLSv1_2'
   * @property {string} [operationalState] Operational state of the application
   * gateway resource. Possible values include: 'Stopped', 'Starting',
   * 'Running', 'Stopping'
   * @property {array} [gatewayIPConfigurations] Subnets of the application
   * gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [authenticationCertificates] Authentication certificates
   * of the application gateway resource. For default limits, see [Application
   * Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [trustedRootCertificates] Trusted Root certificates of
   * the application gateway resource. For default limits, see [Application
   * Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [sslCertificates] SSL certificates of the application
   * gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [frontendIPConfigurations] Frontend IP addresses of the
   * application gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [frontendPorts] Frontend ports of the application
   * gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [probes] Probes of the application gateway resource.
   * @property {array} [backendAddressPools] Backend address pool of the
   * application gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [backendHttpSettingsCollection] Backend http settings of
   * the application gateway resource. For default limits, see [Application
   * Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [httpListeners] Http listeners of the application
   * gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [urlPathMaps] URL path map of the application gateway
   * resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {array} [requestRoutingRules] Request routing rules of the
   * application gateway resource.
   * @property {array} [rewriteRuleSets] Rewrite rules for the application
   * gateway resource.
   * @property {array} [redirectConfigurations] Redirect configurations of the
   * application gateway resource. For default limits, see [Application Gateway
   * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
   * @property {object} [webApplicationFirewallConfiguration] Web application
   * firewall configuration.
   * @property {boolean} [webApplicationFirewallConfiguration.enabled] Whether
   * the web application firewall is enabled or not.
   * @property {string} [webApplicationFirewallConfiguration.firewallMode] Web
   * application firewall mode. Possible values include: 'Detection',
   * 'Prevention'
   * @property {string} [webApplicationFirewallConfiguration.ruleSetType] The
   * type of the web application firewall rule set. Possible values are:
   * 'OWASP'.
   * @property {string} [webApplicationFirewallConfiguration.ruleSetVersion]
   * The version of the rule set type.
   * @property {array} [webApplicationFirewallConfiguration.disabledRuleGroups]
   * The disabled rule groups.
   * @property {boolean} [webApplicationFirewallConfiguration.requestBodyCheck]
   * Whether allow WAF to check request Body.
   * @property {number}
   * [webApplicationFirewallConfiguration.maxRequestBodySize] Maximum request
   * body size for WAF.
   * @property {number}
   * [webApplicationFirewallConfiguration.maxRequestBodySizeInKb] Maximum
   * request body size in Kb for WAF.
   * @property {number}
   * [webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum file
   * upload size in Mb for WAF.
   * @property {array} [webApplicationFirewallConfiguration.exclusions] The
   * exclusion list.
   * @property {object} [firewallPolicy] Reference of the FirewallPolicy
   * resource.
   * @property {string} [firewallPolicy.id] Resource ID.
   * @property {boolean} [enableHttp2] Whether HTTP2 is enabled on the
   * application gateway resource.
   * @property {boolean} [enableFips] Whether FIPS is enabled on the
   * application gateway resource.
   * @property {object} [autoscaleConfiguration] Autoscale Configuration.
   * @property {number} [autoscaleConfiguration.minCapacity] Lower bound on
   * number of Application Gateway capacity
   * @property {number} [autoscaleConfiguration.maxCapacity] Upper bound on
   * number of Application Gateway capacity
   * @property {string} [resourceGuid] Resource GUID property of the
   * application gateway resource.
   * @property {string} [provisioningState] Provisioning state of the
   * application gateway resource. Possible values are: 'Updating', 'Deleting',
   * and 'Failed'.
   * @property {array} [customErrorConfigurations] Custom error configurations
   * of the application gateway resource.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   * @property {array} [zones] A list of availability zones denoting where the
   * resource needs to come from.
   * @property {object} [identity] The identity of the application gateway, if
   * configured.
   * @property {string} [identity.principalId] The principal id of the system
   * assigned identity. This property will only be provided for a system
   * assigned identity.
   * @property {string} [identity.tenantId] The tenant id of the system
   * assigned identity. This property will only be provided for a system
   * assigned identity.
   * @property {string} [identity.type] The type of identity used for the
   * resource. The type 'SystemAssigned, UserAssigned' includes both an
   * implicitly created identity and a set of user assigned identities. The
   * type 'None' will remove any identities from the virtual machine. Possible
   * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,
   * UserAssigned', 'None'
   * @property {object} [identity.userAssignedIdentities] The list of user
   * identities associated with resource. The user identity dictionary key
   * references will be ARM resource ids in the form:
   * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ApplicationGateway
   *
   * @returns {object} metadata of ApplicationGateway
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationGateway',
      type: {
        name: 'Composite',
        className: 'ApplicationGateway',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'properties.sku',
            type: {
              name: 'Composite',
              className: 'ApplicationGatewaySku'
            }
          },
          sslPolicy: {
            required: false,
            serializedName: 'properties.sslPolicy',
            type: {
              name: 'Composite',
              className: 'ApplicationGatewaySslPolicy'
            }
          },
          operationalState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.operationalState',
            type: {
              name: 'String'
            }
          },
          gatewayIPConfigurations: {
            required: false,
            serializedName: 'properties.gatewayIPConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayIPConfigurationElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayIPConfiguration'
                  }
              }
            }
          },
          authenticationCertificates: {
            required: false,
            serializedName: 'properties.authenticationCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayAuthenticationCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayAuthenticationCertificate'
                  }
              }
            }
          },
          trustedRootCertificates: {
            required: false,
            serializedName: 'properties.trustedRootCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayTrustedRootCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayTrustedRootCertificate'
                  }
              }
            }
          },
          sslCertificates: {
            required: false,
            serializedName: 'properties.sslCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewaySslCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewaySslCertificate'
                  }
              }
            }
          },
          frontendIPConfigurations: {
            required: false,
            serializedName: 'properties.frontendIPConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayFrontendIPConfigurationElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayFrontendIPConfiguration'
                  }
              }
            }
          },
          frontendPorts: {
            required: false,
            serializedName: 'properties.frontendPorts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayFrontendPortElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayFrontendPort'
                  }
              }
            }
          },
          probes: {
            required: false,
            serializedName: 'properties.probes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayProbeElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayProbe'
                  }
              }
            }
          },
          backendAddressPools: {
            required: false,
            serializedName: 'properties.backendAddressPools',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayBackendAddressPoolElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayBackendAddressPool'
                  }
              }
            }
          },
          backendHttpSettingsCollection: {
            required: false,
            serializedName: 'properties.backendHttpSettingsCollection',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayBackendHttpSettingsElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayBackendHttpSettings'
                  }
              }
            }
          },
          httpListeners: {
            required: false,
            serializedName: 'properties.httpListeners',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayHttpListenerElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayHttpListener'
                  }
              }
            }
          },
          urlPathMaps: {
            required: false,
            serializedName: 'properties.urlPathMaps',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayUrlPathMapElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayUrlPathMap'
                  }
              }
            }
          },
          requestRoutingRules: {
            required: false,
            serializedName: 'properties.requestRoutingRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayRequestRoutingRuleElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayRequestRoutingRule'
                  }
              }
            }
          },
          rewriteRuleSets: {
            required: false,
            serializedName: 'properties.rewriteRuleSets',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayRewriteRuleSetElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayRewriteRuleSet'
                  }
              }
            }
          },
          redirectConfigurations: {
            required: false,
            serializedName: 'properties.redirectConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayRedirectConfigurationElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayRedirectConfiguration'
                  }
              }
            }
          },
          webApplicationFirewallConfiguration: {
            required: false,
            serializedName: 'properties.webApplicationFirewallConfiguration',
            type: {
              name: 'Composite',
              className: 'ApplicationGatewayWebApplicationFirewallConfiguration'
            }
          },
          firewallPolicy: {
            required: false,
            serializedName: 'properties.firewallPolicy',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          enableHttp2: {
            required: false,
            serializedName: 'properties.enableHttp2',
            type: {
              name: 'Boolean'
            }
          },
          enableFips: {
            required: false,
            serializedName: 'properties.enableFips',
            type: {
              name: 'Boolean'
            }
          },
          autoscaleConfiguration: {
            required: false,
            serializedName: 'properties.autoscaleConfiguration',
            type: {
              name: 'Composite',
              className: 'ApplicationGatewayAutoscaleConfiguration'
            }
          },
          resourceGuid: {
            required: false,
            serializedName: 'properties.resourceGuid',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          customErrorConfigurations: {
            required: false,
            serializedName: 'properties.customErrorConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayCustomErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayCustomError'
                  }
              }
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          zones: {
            required: false,
            serializedName: 'zones',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          identity: {
            required: false,
            serializedName: 'identity',
            type: {
              name: 'Composite',
              className: 'ManagedServiceIdentity'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationGateway;
