/**
 * Web Application Firewall (WAF) API
 * API for the Web Application Firewall service.
Use this API to manage regional Web App Firewalls and corresponding policies for protecting HTTP services.

 * OpenAPI spec version: 20210930
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */ import * as model from "../model" ; import common = require ( "oci-common" ) ; /**
* The details of WebAppFirewallPolicy. A policy is comprised of rules, which allows executing inspections of
* incoming/outgoing HTTP message parameters and execution of actions, based on results of rules execution.
* <p>
In policy, rules are grouped into modules by their functionality. Modules can be further divided by the type
* of HTTP messages they handle:
*   Modules that inspect incoming HTTP request. These modules are executed in the order they are enumerated here:
*     * requestAccessControl
*     * requestRateLimiting
*     * requestProtection
* <p>
 Modules that inspect outgoing HTTP responses. These modules are executed in the order they are enumerated here:
*    * responseAccessControl
*    * responseProtection
*
*/ export interface WebAppFirewallPolicy { /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the WebAppFirewallPolicy.
     */ "id" : string ; /**
     * WebAppFirewallPolicy display name, can be renamed.
     */ "displayName" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment.
     */ "compartmentId" : string ; /**
     * The time the WebAppFirewallPolicy was created. An RFC3339 formatted datetime string.
     */ "timeCreated" : Date ; /**
     * The time the WebAppFirewallPolicy was updated. An RFC3339 formatted datetime string.
     */ "timeUpdated" ? : Date ; /**
     * The current state of the WebAppFirewallPolicy.
     */ "lifecycleState" : WebAppFirewallPolicy . LifecycleState ; /**
     * A message describing the current state in more detail.
     * For example, can be used to provide actionable information for a resource in FAILED state.
     *
     */ "lifecycleDetails" ? : string ; /**
     * Predefined actions for use in multiple different rules. Not all actions are supported in every module.
     * Some actions terminate further execution of modules and rules in a module and some do not.
     * Actions names must be unique within this array.
     *
     */ "actions" ? : Array < model . Action > ; "requestAccessControl" ? : model . RequestAccessControl ; "requestRateLimiting" ? : model . RequestRateLimiting ; "requestProtection" ? : model . RequestProtection ; "responseAccessControl" ? : model . ResponseAccessControl ; "responseProtection" ? : model . ResponseProtection ; /**
     * Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
     * Example: `{\"bar-key\": \"value\"}`
     *
     */ "freeformTags" : { [ key ] : string ; } ; /**
     * Defined tags for this resource. Each key is predefined and scoped to a namespace.
     * Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`
     *
     */ "definedTags" : { [ key ] : { [ key ] : any ; } ; } ; /**
     * Usage of system tag keys. These predefined keys are scoped to namespaces.
     * Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`
     *
     */ "systemTags" : { [ key ] : { [ key ] : any ; } ; } ; } export namespace WebAppFirewallPolicy { export enum LifecycleState { Creating = "CREATING" , Updating = "UPDATING" , Active = "ACTIVE" , Deleting = "DELETING" , Deleted = "DELETED" , Failed = "FAILED" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { "actions" : obj . actions ? obj . actions . map ( item => { return model . Action . getJsonObj ( item ) ; } ) : undefined , "requestAccessControl" : obj . requestAccessControl ? model . RequestAccessControl . getJsonObj ( obj . requestAccessControl ) : undefined , "requestRateLimiting" : obj . requestRateLimiting ? model . RequestRateLimiting . getJsonObj ( obj . requestRateLimiting ) : undefined , "requestProtection" : obj . requestProtection ? model . RequestProtection . getJsonObj ( obj . requestProtection ) : undefined , "responseAccessControl" : obj . responseAccessControl ? model . ResponseAccessControl . getJsonObj ( obj . responseAccessControl ) : undefined , "responseProtection" : obj . responseProtection ? model . ResponseProtection . getJsonObj ( obj . responseProtection ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "actions" : obj . actions ? obj . actions . map ( item => { return model . Action . getDeserializedJsonObj ( item ) ; } ) : undefined , "requestAccessControl" : obj . requestAccessControl ? model . RequestAccessControl . getDeserializedJsonObj ( obj . requestAccessControl ) : undefined , "requestRateLimiting" : obj . requestRateLimiting ? model . RequestRateLimiting . getDeserializedJsonObj ( obj . requestRateLimiting ) : undefined , "requestProtection" : obj . requestProtection ? model . RequestProtection . getDeserializedJsonObj ( obj . requestProtection ) : undefined , "responseAccessControl" : obj . responseAccessControl ? model . ResponseAccessControl . getDeserializedJsonObj ( obj . responseAccessControl ) : undefined , "responseProtection" : obj . responseProtection ? model . ResponseProtection . getDeserializedJsonObj ( obj . responseProtection ) : undefined } } ; return jsonObj ; } }