/**
 * Database Management API
 * Use the Database Management API to perform tasks such as obtaining performance and resource usage metrics
for a fleet of Managed Databases or a specific Managed Database, creating Managed Database Groups, and
running a SQL job on a Managed Database or Managed Database Group.

 * OpenAPI spec version: 20201101
 *
 *
 * 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 AWR query result.
 */ export interface AwrQueryResult { /**
     * The name of the query result.
     */ "name" : string ; /**
     * The version of the query result.
     */ "version" ? : string ; /**
     * The ID assigned to the query instance.
     */ "queryKey" ? : string ; /**
     * The time taken to query the database tier (in seconds). Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
     */ "dbQueryTimeInSecs" ? : number ; "awrResultType" : string ; } export namespace AwrQueryResult { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "awrResultType" in obj && obj . awrResultType ) { switch ( obj . awrResultType ) { case "AWRDB_DB_PARAMETER_CHANGE" : return model . AwrDbParameterChangeCollection . getJsonObj ( < model . AwrDbParameterChangeCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_ASH_CPU_USAGE_SET" : return model . AwrDbCpuUsageCollection . getJsonObj ( < model . AwrDbCpuUsageCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_EVENT_HISTOGRAM_SET" : return model . AwrDbWaitEventBucketCollection . getJsonObj ( < model . AwrDbWaitEventBucketCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_DB_PARAMETER_SET" : return model . AwrDbParameterCollection . getJsonObj ( < model . AwrDbParameterCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SYSSTAT_SET" : return model . AwrDbSysstatCollection . getJsonObj ( < model . AwrDbSysstatCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_TOP_EVENT_SET" : return model . AwrDbTopWaitEventCollection . getJsonObj ( < model . AwrDbTopWaitEventCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SNAPSHOT_SET" : return model . AwrDbSnapshotCollection . getJsonObj ( < model . AwrDbSnapshotCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SET" : return model . AwrDbCollection . getJsonObj ( < model . AwrDbCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SNAPSHOT_RANGE_SET" : return model . AwrDbSnapshotRangeCollection . getJsonObj ( < model . AwrDbSnapshotRangeCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_DB_REPORT" : return model . AwrDbReport . getJsonObj ( < model . AwrDbReport > ( < object > jsonObj ) , true ) ; case "AWRDB_METRICS_SET" : return model . AwrDbMetricCollection . getJsonObj ( < model . AwrDbMetricCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_EVENT_SET" : return model . AwrDbWaitEventCollection . getJsonObj ( < model . AwrDbWaitEventCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SQL_REPORT" : return model . AwrDbSqlReport . getJsonObj ( < model . AwrDbSqlReport > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . awrResultType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "awrResultType" in obj && obj . awrResultType ) { switch ( obj . awrResultType ) { case "AWRDB_DB_PARAMETER_CHANGE" : return model . AwrDbParameterChangeCollection . getDeserializedJsonObj ( < model . AwrDbParameterChangeCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_ASH_CPU_USAGE_SET" : return model . AwrDbCpuUsageCollection . getDeserializedJsonObj ( < model . AwrDbCpuUsageCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_EVENT_HISTOGRAM_SET" : return model . AwrDbWaitEventBucketCollection . getDeserializedJsonObj ( < model . AwrDbWaitEventBucketCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_DB_PARAMETER_SET" : return model . AwrDbParameterCollection . getDeserializedJsonObj ( < model . AwrDbParameterCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SYSSTAT_SET" : return model . AwrDbSysstatCollection . getDeserializedJsonObj ( < model . AwrDbSysstatCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_TOP_EVENT_SET" : return model . AwrDbTopWaitEventCollection . getDeserializedJsonObj ( < model . AwrDbTopWaitEventCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SNAPSHOT_SET" : return model . AwrDbSnapshotCollection . getDeserializedJsonObj ( < model . AwrDbSnapshotCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SET" : return model . AwrDbCollection . getDeserializedJsonObj ( < model . AwrDbCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SNAPSHOT_RANGE_SET" : return model . AwrDbSnapshotRangeCollection . getDeserializedJsonObj ( < model . AwrDbSnapshotRangeCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_DB_REPORT" : return model . AwrDbReport . getDeserializedJsonObj ( < model . AwrDbReport > ( < object > jsonObj ) , true ) ; case "AWRDB_METRICS_SET" : return model . AwrDbMetricCollection . getDeserializedJsonObj ( < model . AwrDbMetricCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_EVENT_SET" : return model . AwrDbWaitEventCollection . getDeserializedJsonObj ( < model . AwrDbWaitEventCollection > ( < object > jsonObj ) , true ) ; case "AWRDB_SQL_REPORT" : return model . AwrDbSqlReport . getDeserializedJsonObj ( < model . AwrDbSqlReport > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . awrResultType ) ; } } return jsonObj ; } }