GenericEntity

class oci.data_labeling_service_dataplane.models.GenericEntity(**kwargs)

Bases: oci.data_labeling_service_dataplane.models.entity.Entity

This is an extensible entity type for users, and the base entity type for some annotation formats.

Attributes

ENTITY_TYPE_GENERIC str(object=’’) -> str
ENTITY_TYPE_IMAGEOBJECTSELECTION str(object=’’) -> str
ENTITY_TYPE_TEXTSELECTION str(object=’’) -> str
entity_type [Required] Gets the entity_type of this Entity.
extended_metadata Gets the extended_metadata of this GenericEntity.
labels [Required] Gets the labels of this GenericEntity.

Methods

__init__(**kwargs) Initializes a new GenericEntity object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
ENTITY_TYPE_GENERIC = 'GENERIC'
ENTITY_TYPE_IMAGEOBJECTSELECTION = 'IMAGEOBJECTSELECTION'
ENTITY_TYPE_TEXTSELECTION = 'TEXTSELECTION'
__init__(**kwargs)

Initializes a new GenericEntity object with values from keyword arguments. The default value of the entity_type attribute of this class is GENERIC and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • entity_type (str) – The value to assign to the entity_type property of this GenericEntity. Allowed values for this property are: “GENERIC”, “IMAGEOBJECTSELECTION”, “TEXTSELECTION”
  • labels (list[oci.data_labeling_service_dataplane.models.Label]) – The value to assign to the labels property of this GenericEntity.
  • extended_metadata (dict(str, str)) – The value to assign to the extended_metadata property of this GenericEntity.
entity_type

[Required] Gets the entity_type of this Entity. The entity type described in the annotation. GENERIC - An extensible entity type that is the base entity type for some annotation formats. IMAGEOBJECTSELECTION- - This allows the labeler to use specify a bounding polygon on the image to represent an object and apply labels to it. TEXTSELECTION - This allows the labeler to highlight text, by specifying an offset and a length, and apply labels to it.

Allowed values for this property are: “GENERIC”, “IMAGEOBJECTSELECTION”, “TEXTSELECTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The entity_type of this Entity.
Return type:str
extended_metadata

Gets the extended_metadata of this GenericEntity. A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. For example: {“bar-key”: “value”}

Returns:The extended_metadata of this GenericEntity.
Return type:dict(str, str)
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

labels

[Required] Gets the labels of this GenericEntity. A collection of label entities.

Returns:The labels of this GenericEntity.
Return type:list[oci.data_labeling_service_dataplane.models.Label]