/**
 * LogAnalytics API
 * The LogAnalytics API for the LogAnalytics service.

 * OpenAPI spec version: 20200601
 *
 *
 * 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" ) ; /**
 * Generic field defining all attributes common to all querylanguage fields.
 *
 */ export interface AbstractField { /**
     * Field display name - will be alias if field is renamed by queryStrng.
     *
     */ "displayName" ? : string ; /**
     * Field denoting if this is a declaration of the field in the queryString.
     *
     */ "isDeclared" ? : boolean ; /**
     * Same as displayName unless field renamed in which case this will hold the original display names for the field
     * across all renames.
     *
     */ "originalDisplayNames" ? : Array < string > ; /**
     * Internal identifier for the field.
     *
     */ "internalName" ? : string ; /**
     * Field denoting field data type.
     *
     */ "valueType" ? : model . ValueType ; /**
     * Identifies if this field can be used as a grouping field in any grouping command.
     *
     */ "isGroupable" ? : boolean ; /**
     * Identifies if this field format is a duration.
     *
     */ "isDuration" ? : boolean ; /**
     * Alias of field if renamed by queryStrng.
     *
     */ "alias" ? : string ; /**
     * Query used to derive this field if specified.
     *
     */ "filterQueryString" ? : string ; /**
     * Field denoting field unit type.
     *
     */ "unitType" ? : string ; "name" : string ; } export namespace AbstractField { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "name" in obj && obj . name ) { switch ( obj . name ) { case "FIELDS" : return model . FieldsAddRemoveField . getJsonObj ( < model . FieldsAddRemoveField > ( < object > jsonObj ) , true ) ; case "FUNCTION" : return model . FunctionField . getJsonObj ( < model . FunctionField > ( < object > jsonObj ) , true ) ; case "FIELD" : return model . Field . getJsonObj ( < model . Field > ( < object > jsonObj ) , true ) ; case "SORT" : return model . SortField . getJsonObj ( < model . SortField > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . name ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "name" in obj && obj . name ) { switch ( obj . name ) { case "FIELDS" : return model . FieldsAddRemoveField . getDeserializedJsonObj ( < model . FieldsAddRemoveField > ( < object > jsonObj ) , true ) ; case "FUNCTION" : return model . FunctionField . getDeserializedJsonObj ( < model . FunctionField > ( < object > jsonObj ) , true ) ; case "FIELD" : return model . Field . getDeserializedJsonObj ( < model . Field > ( < object > jsonObj ) , true ) ; case "SORT" : return model . SortField . getDeserializedJsonObj ( < model . SortField > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . name ) ; } } return jsonObj ; } }