Entity constructor

Entity(
  1. String type,
  2. dynamic id
)

Initializes the Entity object

type - Entity's type

id - {String | int} - Entity's id

Entity entity = new Entity("User", "87717c11-ed5a...")
//Adds an attribute to the entity (Method Chainable)
.addAttribute("Name", "Sam Smith")
//Adds an attribute that references another entity (Method Chainable)
.addEntityReferencedAttribute("Location", "Country", "US");

Implementation

Entity(this.type, this.id);