/**
 * DlsDataPlane API
 * A description of the DlsDataPlane API.
 * OpenAPI spec version: 20211001
 *
 *
 * 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 entity allows the labeler to identify an object in the record to label.  This can be a snippet of text, an entire image, a bounding box within an image, or, eventually, a custom format that works for them.  All entity types will have an array of labels that we'll index. If more than one label is provided, but the annotationType on the corresponding Dataset is for single class, the API will reject the create annotation request.
 *
 */ export interface Entity { "entityType" : string ; } export namespace Entity { export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "entityType" in obj && obj . entityType ) { switch ( obj . entityType ) { case "IMAGEOBJECTSELECTION" : return model . ImageObjectSelectionEntity . getJsonObj ( < model . ImageObjectSelectionEntity > ( < object > jsonObj ) , true ) ; case "GENERIC" : return model . GenericEntity . getJsonObj ( < model . GenericEntity > ( < object > jsonObj ) , true ) ; case "TEXTSELECTION" : return model . TextSelectionEntity . getJsonObj ( < model . TextSelectionEntity > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . entityType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { } } ; if ( "entityType" in obj && obj . entityType ) { switch ( obj . entityType ) { case "IMAGEOBJECTSELECTION" : return model . ImageObjectSelectionEntity . getDeserializedJsonObj ( < model . ImageObjectSelectionEntity > ( < object > jsonObj ) , true ) ; case "GENERIC" : return model . GenericEntity . getDeserializedJsonObj ( < model . GenericEntity > ( < object > jsonObj ) , true ) ; case "TEXTSELECTION" : return model . TextSelectionEntity . getDeserializedJsonObj ( < model . TextSelectionEntity > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . entityType ) ; } } return jsonObj ; } }