/**
 * Load Balancing API
 * API for the Load Balancing service. Use this API to manage load balancers, backend sets, and related items. For more
information, see [Overview of Load Balancing](/iaas/Content/Balance/Concepts/balanceoverview.htm).

 * OpenAPI spec version: 20170115
 *
 *
 * 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" ) ; /**
* An object that represents the action of returning a specified response code and a redirect URI. Each RedirectRule
* object is configured for a particular listener and a designated path.
* <p>
The default response code is `302 Found`.
* <p>
**NOTES:**
* *  This rule applies only to HTTP listeners.
* *  You can specify this rule only with the  {@link #ruleCondition(RuleConditionRequest) ruleCondition} *    type `PATH`.
* *  A listener can have only one RedirectRule object for a given original path. The
*    {@link #pathMatchCondition(PathMatchConditionRequest) pathMatchCondition} `attributeValue` specifies the
*   original path.
*
 export interface RedirectRule extends model . Rule { /**
      * The HTTP status code to return when the incoming request is redirected.
  * <p>
  The status line returned with the code is mapped from the standard HTTP specification. Valid response
  * codes for redirection are:
  * <p>
  *  301
  * *  302
  * *  303
  * *  307
  * *  308
  * <p>
  The default value is `302` (Found).
  * <p>
  Example: `301`
  *  Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
      */ "responseCode" ? : number ; "conditions" : Array < model . RuleCondition > ; "redirectUri" ? : model . RedirectUri ; "action" : string ; } export namespace RedirectRule { export function getJsonObj ( obj , isParentJsonObj ? ) { const jsonObj = { ... ( isParentJsonObj ? obj : ( model . Rule . getJsonObj ( obj ) as RedirectRule ) ) , ... { "conditions" : obj . conditions ? obj . conditions . map ( item => { return model . RuleCondition . getJsonObj ( item ) ; } ) : undefined , "redirectUri" : obj . redirectUri ? model . RedirectUri . getJsonObj ( obj . redirectUri ) : undefined } } ; return jsonObj ; } export const action = "REDIRECT" ; export function getDeserializedJsonObj ( obj , isParentJsonObj ? ) { const jsonObj = { ... ( isParentJsonObj ? obj : ( model . Rule . getDeserializedJsonObj ( obj ) as RedirectRule ) ) , ... { "conditions" : obj . conditions ? obj . conditions . map ( item => { return model . RuleCondition . getDeserializedJsonObj ( item ) ; } ) : undefined , "redirectUri" : obj . redirectUri ? model . RedirectUri . getDeserializedJsonObj ( obj . redirectUri ) : undefined } } ; return jsonObj ; } }