/**
 * Application Performance Monitoring Synthetic Monitoring API
 * Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors.
 * OpenAPI spec version: 20200630
 *
 *
 * 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" ) ; /**
 * Details of monitor configuration.
 */ export interface MonitorConfiguration { /**
     * If isFailureRetried is enabled, then a failed call will be retried.
     */ "isFailureRetried" ? : boolean ; "configType" : string ; } export namespace MonitorConfiguration { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "configType" in obj && obj . configType ) { switch ( obj . configType ) { case "SCRIPTED_REST_CONFIG" : return model . ScriptedRestMonitorConfiguration . getJsonObj ( < model . ScriptedRestMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "SCRIPTED_BROWSER_CONFIG" : return model . ScriptedBrowserMonitorConfiguration . getJsonObj ( < model . ScriptedBrowserMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "REST_CONFIG" : return model . RestMonitorConfiguration . getJsonObj ( < model . RestMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "BROWSER_CONFIG" : return model . BrowserMonitorConfiguration . getJsonObj ( < model . BrowserMonitorConfiguration > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . configType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "configType" in obj && obj . configType ) { switch ( obj . configType ) { case "SCRIPTED_REST_CONFIG" : return model . ScriptedRestMonitorConfiguration . getDeserializedJsonObj ( < model . ScriptedRestMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "SCRIPTED_BROWSER_CONFIG" : return model . ScriptedBrowserMonitorConfiguration . getDeserializedJsonObj ( < model . ScriptedBrowserMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "REST_CONFIG" : return model . RestMonitorConfiguration . getDeserializedJsonObj ( < model . RestMonitorConfiguration > ( < object > jsonObj ) , true ) ; case "BROWSER_CONFIG" : return model . BrowserMonitorConfiguration . getDeserializedJsonObj ( < model . BrowserMonitorConfiguration > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . configType ) ; } } return jsonObj ; } }