/**
 * Apm Configuration API
 * An API for the APM Configuration service. Use this API to query and set APM configuration.
 * OpenAPI spec version: 20210201
 *
 *
 * 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" ) ; /**
 * A configuration item. This item has a number of mutually exclusive properties that can be used to set specific
 * portions of the configuration.
 *
 */ export interface Config { /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the configuration item. An OCID will be generated
     * when the item is created.
     *
     */ "id" ? : string ; /**
     * The time the resource was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)
     * timestamp format.
     * Example: `2020-02-12T22:47:12.613Z`
     *
     */ "timeCreated" ? : Date ; /**
     * The time the resource was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)
     * timestamp format.
     * Example: `2020-02-13T22:47:12.613Z`
     *
     */ "timeUpdated" ? : Date ; /**
     * 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 ; } ; } ; "configType" : string ; } export namespace Config { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "configType" in obj && obj . configType ) { switch ( obj . configType ) { case "METRIC_GROUP" : return model . MetricGroup . getJsonObj ( < model . MetricGroup > ( < object > jsonObj ) , true ) ; case "APDEX" : return model . ApdexRules . getJsonObj ( < model . ApdexRules > ( < object > jsonObj ) , true ) ; case "SPAN_FILTER" : return model . SpanFilter . getJsonObj ( < model . SpanFilter > ( < 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 "METRIC_GROUP" : return model . MetricGroup . getDeserializedJsonObj ( < model . MetricGroup > ( < object > jsonObj ) , true ) ; case "APDEX" : return model . ApdexRules . getDeserializedJsonObj ( < model . ApdexRules > ( < object > jsonObj ) , true ) ; case "SPAN_FILTER" : return model . SpanFilter . getDeserializedJsonObj ( < model . SpanFilter > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . configType ) ; } } return jsonObj ; } }