# Class DatabaseEntity (1.16.0)

1.16.0 (latest) 1.15.0 1.14.0 1.13.0 1.12.4 1.11.0 1.10.1 1.9.5 1.8.0 1.7.1 1.6.2 1.5.0 1.4.3 1.3.2 1.2.1 1.1.0 1.0.2 0.2.4 0.1.0

    DatabaseEntity(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The base entity type for all the database related entities.
The message contains the entity name, the name of its parent,
the entity type, and the specific details per entity type.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `short_name` | `str` The short name (e.g. table name) of the entity. |
| `parent_entity` | `str` The full name of the parent entity (e.g. schema name). |
| `tree` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.DatabaseEntity.TreeType` The type of tree the entity belongs to. |
| `entity_type` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.DatabaseEntityType` The type of the database entity (table, view, index, ...). |
| `mappings` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.EntityMapping]` Details about entity mappings. For source tree entities, this holds the draft entities which were generated by the mapping rules. For draft tree entities, this holds the source entities which were converted to form the draft entity. Destination entities will have no mapping details. |
| `entity_ddl` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.EntityDdl]` Details about the entity DDL script. Multiple DDL scripts are provided for child entities such as a table entity will have one DDL for the table with additional DDLs for each index, constraint and such. |
| `issues` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.EntityIssue]` Details about the various issues found for the entity. |
| `database` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.DatabaseInstanceEntity` Database. This field is a member of `oneof`_ `entity_body`. |
| `schema` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.SchemaEntity` Schema. This field is a member of `oneof`_ `entity_body`. |
| `table` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.TableEntity` Table. This field is a member of `oneof`_ `entity_body`. |
| `view` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.ViewEntity` View. This field is a member of `oneof`_ `entity_body`. |
| `sequence` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.SequenceEntity` Sequence. This field is a member of `oneof`_ `entity_body`. |
| `stored_procedure` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.StoredProcedureEntity` Stored procedure. This field is a member of `oneof`_ `entity_body`. |
| `database_function` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.FunctionEntity` Function. This field is a member of `oneof`_ `entity_body`. |
| `synonym` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.SynonymEntity` Synonym. This field is a member of `oneof`_ `entity_body`. |
| `database_package` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.PackageEntity` Package. This field is a member of `oneof`_ `entity_body`. |
| `udt` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.UDTEntity` UDT. This field is a member of `oneof`_ `entity_body`. |
| `materialized_view` | `https://docs.cloud.google.com/python/docs/reference/datamigration/latest/google.cloud.clouddms_v1.types.MaterializedViewEntity` Materialized view. This field is a member of `oneof`_ `entity_body`. |

## Classes

### TreeType

    TreeType(value)

The type of database entities tree.