import { PropertyValue } from './PropertyValue'; import { Property } from './Property'; import { EntityType } from './EntityType'; import { EntityAsObject } from './EntityAsObject'; import { SourceId } from './SourceId'; import { Guid } from '@dolittle/rudiments'; /** * Represents an entity coming from a source. */ export declare class Entity { readonly entityType: EntityType; readonly id: Guid; readonly values: PropertyValue[]; readonly sourceId: SourceId; /** * Initializes a new instance of {Entity}. * @param {EntityType} entityType Type of entity. * @param {Guid} id The unique identity for the entity. * @param {PropertyValue[]} values All the values on the entity */ constructor(entityType: EntityType, id: Guid, values: PropertyValue[]); /** * Get a value for a specific property. * @param {Property} property property to get value for. * @returns {PropertyValue} */ getValueFor(property: Property): PropertyValue; /** * Convert an entity to a plain old JS object. * @returns {EntityAsObject} */ toObject(): EntityAsObject; /** * Converts from object to entity * @param {EntityType} entityType Type of entity. * @param {*} object Object instance. * @returns {Entity} Entity instance. */ static fromObject(entityType: EntityType, object: any): Entity; /** * Get the hash of the entity. */ getHashCode(): string; } //# sourceMappingURL=Entity.d.ts.map